需要有一个“职工号”相同值不同的列,然后这么做。
select 职工号,rank() over(partition by 职工号 order by 不同的列) from 表

解决方案 »

  1.   

    select 职工号,row_number() over(partition by 职工号 order by 职工号) from 表
      

  2.   

    >update怎么写呢??
    一句update好像不行啊!
      

  3.   

    update table1 a set 序号=(
       select xh from (
           select rowid rid,职工号,rank() over(partition by 职工号 order by rowid) xh
           from table1 
       ) b where a.rowid=b.rid
    )