close
下列的語法可以SELECT 出第 10筆到第20筆之間的資料,
靠的是SQL 2005 的新功能 ROW_NUMBER()
SELECT RowNum,USER_GUID,NAME
FROM
(SELECT USER_GUID,NAME ,
ROW_NUMBER() OVER(ORDER BY USER_GUID) as RowNum
FROM TB_EB_USER
) as DerivedTableName
WHERE RowNum BETWEEN 10 AND 20
全站熱搜
留言列表