在SQL2005以上可以使用Row_Number()来获取行号,SQL2000中没有这个函数,我们可以用下面的方法来获取行号:

select ( select count(*)
            
from   tb_product p1
            
where  p1.proid <= p2.proid)  as rowNumber,
* from tb_product p2
order by rowNumber

 

 

相关文章:

  • 2021-04-24
  • 2021-11-02
  • 2022-12-23
  • 2022-12-23
  • 2021-11-03
  • 2021-12-13
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-16
  • 2021-08-14
  • 2022-12-23
  • 2021-11-17
相关资源
相似解决方案