依照建立日期的順序取得分頁資料的Store Procedure
CREATE PROCEDURE [dbo].[sp_GetVoiceListByDate]
@pageNum int, --頁碼
@pageSize int --顯示數量
AS
BEGIN
Select Top (@pageSize) u.UserId, u.UserScore, v.Context, u.UserImagePath, v.CreateDate
From tb_UserInfor AS u, tb_Voice AS v
Where u.Id = v.Id
And v.CreateDate not in (
Select Top (@pageSize*@pageNum) v.CreateDate
From tb_UserInfor AS u, tb_Voice AS v
Where u.Id = v.Id
ORDER BY v.CreateDate desc )
Order By v.CreateDate desc END
2008/03/19
取得分頁資料的Store Procedure
訂閱:
張貼留言 (Atom)
0 pushs:
張貼留言