sqlserver 2000で現実tableの行番号
方法1:
方法2:
ページングの実装:
select id=identity(int,1,1),* into # from tb
select * from #
drop table #
方法2:
select rowid=(select count(*) from where ID<=a. ID),* from a
ページングの実装:
SELECT rownum=IDENTITY(INT,1,1),* INTO # FROM (SELECT * FROM GGFB) AS T SELECT * FROM # WHERE rownum <= 10 and rownum >= 0 DROP TABLE #