<三> SQL杂七杂八
批量插入测试数据
use Test
declare @count INT
set @count = 0
while(@count < 10)
begin
waitfor delay '000:00:10'
insert into Northwind(CategoryName,[Description])
values('Beverages', 'test')
set @count=@count+1
end
数据库分页-用到ROW_NUMBE()
select * from (
select *, ROW_NUMBER() over (order by Id) as rank from dbo.tablename
) as t where t.rank between 1 and 10