|
oracle 在oracle中用ROWNUM sqlserver 有两种方式 一种是使用临时表,#表名 是临时表,##表名 是全局表。 select identity(int,1,1) ROWNUM,TABLE.FIELD1,TABLE.FIELD2,... into #TEMP; select * from #TEMP where ROWNUM>参数1 and ROWNUM<参数2; 另一种是采用top函数 select top 每页的纪录数 TABLE.FILED1,TABLE.FILED2,... from TABLE where TABLE.关键字 not in (select top 需显示页之前的记录数 TABLE.关键字 from TABLE order by TABLE.关键字) order by TABLE.关键字 值得祝贺的sqlserver2005加入了ROWNUM
|