SELECT TOP <page size> *
FROM (
SELECT
ROW_NUMBER() OVER(ORDER BY CaseId DESC) AS Row
, CaseId, CaseNo, CaseName
FROM dbo.CaseManage
WHERE Creator=@UserId
) Result WHERE ROW > (<page size>*(<page index>-1))
ORDER BY CreateTime DESC;
沒有留言:
張貼留言