SQL Service 排序

SELECT * FROMtable

(tab

    SELECT ROW_NUMBER() OVER(ORDER BY id) AS rownum, * FROM tablenameab

) AS a
WHERE

a.rownum > ((pagenum - 1) * pagesize) AND a.rownum <= (pagenum * pagesize)

相關文章
相關標籤/搜索