代碼如下:
ALTER PROCEDURE [a
@uid int
@pageindex int
@pagesize int
AS
DECLARE @startRow int
@endRow int
SET @startRow = (@pageIndex
IF @pageindex =
BEGIN
EXEC(
)
END
ELSE
BEGIN
EXEC(
SELECT
TOP
[id]
FROM [dnt_myinvite]
WHERE [touid]=
AND [id] < (SELECT MIN([id]) FROM (SELECT TOP
FROM [dnt_myinvite]
WHERE [touid]=
ORDER BY [id] DESC
) AS T
)
ORDER BY [id] DESC
END
From:http://tw.wingwit.com/Article/program/MySQL/201311/29525.html