Oracle update query to update records in sequential order

前端 未结 3 792
孤独总比滥情好
孤独总比滥情好 2021-01-28 14:06

I have a table in Oracle SQL whose ids are in increasing, sequential order, but there are gaps in the ids due to editing, e.g. the ids are currently something like



        
3条回答
  •  执念已碎
    2021-01-28 14:34

    I think this would be easiest approach :

    update mytable set id = ROWNUM;

    Oracle SQL - update ids in oracle sql to be in sequential order

提交回复
热议问题