Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个包含一些值的表和一个对值进行排序的 seq 列,这会显示在前端,所以每当我使用函数删除记录时,这个 seq 排列不正确。
IE
col1: 1 2 3 4 5
删除第 2 条和第 4 条记录后。它是:
Col1: 1 3 5
我尝试了可能的方法来重新排序它:
Col1: 1 2 3..
但它不起作用,有人可以帮忙吗?
我希望您不是在谈论更新主键,这是一个非常糟糕的主意。
否则你可以这样做
update table set col1 = rownum;