例如:
table a
id name
1 tom
2 Jery
3 Jack
4 Mary
Oracle:select rownum ,id,name from (select * from tableName order by cond);
Sql Server:select row_number() over (order by name desc) as rowNum,id,name from a order by name desc
例如:
table a
id name
1 tom
2 Jery
3 Jack
4 Mary
Oracle:select rownum ,id,name from (select * from tableName order by cond);
Sql Server:select row_number() over (order by name desc) as rowNum,id,name from a order by name desc
转载于:https://my.oschina.net/yangphere/blog/59793