Paging query

xiaoxiao2021-03-06  20

-------------------------------------------------- -------------------------- Page inquiry ---- ---- Use the cursor implementation -------- Huang Zong Yin - - 2005.01.23 ------------------------------------------- ------------------------------ Alter Proc P_GETPAGE (@SQL NVARCHAR (4000), - Query Conditions, can query All content to @PAger int = 1, - Back to page @Size int = 2147483647 - Number of per page) AS set nocount on

Declare @Temp Int

Set @pager = (@ Pager-1) * @Size 1

Exec sp_cursoropen @temp output, @SQL exec sp_cursorfetch @temp, 16, @pager, @size exec sp_cursorclose @temp

Return @@ error

转载请注明原文地址:https://www.9cbs.com/read-43626.html

New Post(0)