1 添加字段,然后update字段,使用plsql循环自增长。
2 然后删除当前字段,
3 修改添加字段名

解决方案 »

  1.   

    我想你现在表字段的类型不是数字类型,是字符,所以排序不是按照数字类型如果要按照数字类型排序,首先要转换数字类型然后排序去空格后to_number
    select ID from TB
    order by to_number(trim(id))
      

  2.   

    update 表 set 字段=rownum order by 字段
      

  3.   

    对不起,失误,你是要按照原来的顺序更新的话,可能还要完善一下。
    给你提供点思路,就是使用个rownum进行更新
      

  4.   

    update A t1
       set col =
           (select rn
              from (select col, rownum rn from mm order by col) t2
             where t1.col = t2.col)
      

  5.   

    额 表名- -update A t1
       set col =
           (select rn
              from (select col, rownum rn from A order by col) t2
             where t1.col = t2.col)