C#高效分頁代碼(不用存儲過程)

1.迅速插入50萬數據

 

create table redheadedfile
(
id int identity(1,1),
filenames nvarchar(50),
senduser nvarchar(50),
primary key(id)
)

然後我們寫入50萬條記錄:

declare @i int
set @i=1
while @i<=500000
begin
insert into redheadedfile(filenames,senduser) values("高效分頁算法測試數據" + str(i) ,"北京聯高軟件開發有限公司")
set @i=@i+1
end
GO

 

SQL中STR()函數功能,返回一個數字的等效字符串

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章