五月综合激情婷婷六月,日韩欧美国产一区不卡,他扒开我内裤强吻我下面视频 ,无套内射无矿码免费看黄,天天躁,日日躁,狠狠躁

新聞動態(tài)

分頁存儲過程(用存儲過程實(shí)現(xiàn)數(shù)據(jù)庫的分頁代碼)

發(fā)布日期:2022-01-28 19:44 | 文章來源:站長之家
復(fù)制代碼 代碼如下:

--*******************************************************
--* 分頁存儲過程 *
--* 撒哈拉大森林 *
--* 2010-6-28 *
--******************************************************* if exists(select * from sysobjects where type='P' and name=N'P_Paging')
drop procedure P_Paging
go create procedure P_Paging
@SqlStr nvarchar(4000), --查詢字符串
@CurrentPage int, --第N頁
@PageSize int --每頁行數(shù)
as
set nocount on
declare @P1 int, --P1是游標(biāo)的id
@rowcount int
exec sp_cursoropen @P1 output,@SqlStr,@scrollopt=1,@ccopt=1,@rowcount=@rowcount output
select ceiling(1.0*@rowcount/@PageSize) as 總頁數(shù)--,@rowcount as 總行數(shù),@CurrentPage as 當(dāng)前頁
set @CurrentPage=(@CurrentPage-1)*@PageSize+1
exec sp_cursorfetch @P1,16,@CurrentPage,@PageSize
exec sp_cursorclose @P1
set nocount off
go
----創(chuàng)建測試表
--if exists(select * from sysobjects where type='U' and name=N'Test_Students')
-- drop table Test_Students
--go
--create table Test_Students(
-- id int IDENTITY(1,1) not null,
-- name nvarchar(100) not null
--)
--
----創(chuàng)建測試數(shù)據(jù)
--declare @i int
--set @i = 100000
--while @i>0
-- begin
-- insert into Test_Students values('姓名')
-- set @i = @i - 1
-- end
--
----執(zhí)行存儲過程
--exec P_Paging 'select * from Test_Students order by id',100,100 --執(zhí)行
--
----刪除測試表
--if exists(select * from sysobjects where type='U' and name=N'Test_Students')
-- drop table Test_Students
--go

海外穩(wěn)定服務(wù)器

版權(quán)聲明:本站文章來源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請保持原文完整并注明來源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非maisonbaluchon.cn所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學(xué)習(xí)參考,不代表本站立場,如有內(nèi)容涉嫌侵權(quán),請聯(lián)系alex-e#qq.com處理。

實(shí)時(shí)開通

自選配置、實(shí)時(shí)開通

免備案

全球線路精選!

全天候客戶服務(wù)

7x24全年不間斷在線

專屬顧問服務(wù)

1對1客戶咨詢顧問

在線
客服

在線客服:7*24小時(shí)在線

客服
熱線

400-630-3752
7*24小時(shí)客服服務(wù)熱線

關(guān)注
微信

關(guān)注官方微信
頂部