本文转自:http://xi5566.javaeye.com/blog/204753
select *,(select count(*)+1 from table where table.userId<a.userId )as rowId from table as a
注意这里的userId一定要是自增长
本文转自:http://xi5566.javaeye.com/blog/204753
select *,(select count(*)+1 from table where table.userId<a.userId )as rowId from table as a
注意这里的userId一定要是自增长
2811
1157
257
1434
2万+

被折叠的 条评论
为什么被折叠?