declare   @t   table(a   int,b   int)
insert   into   @t   select   12,     34
union   all   select   12,     56
union   all   select   12,     23
union   all   select   13,     33
union   all   select   14,     11
union   all   select   14,     15

select   *,c=(select   count(*)+1   from   @t   where   a=t1.a   and   b <t1.b) 
 from   @t   t1   order   by   a,b

相关文章:

  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
  • 2021-06-24
  • 2022-12-23
  • 2021-11-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-17
  • 2022-12-23
  • 2022-12-23
  • 2021-05-19
  • 2021-06-14
相关资源
相似解决方案