本文转自:http://xi5566.javaeye.com/blog/204753

select *,(select count(*)+1 from table where table.userId<a.userId )as rowId from table as a
注意这里的userId一定要是自增长

相关文章:

  • 2021-10-02
  • 2021-12-04
  • 2021-09-27
  • 2021-09-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-27
  • 2021-06-13
  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
  • 2021-06-25
  • 2021-06-12
相关资源
相似解决方案