三 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
轉載于:https://www.cnblogs.com/lilideng/p/SQLZ7Z8.html
總結
- 上一篇: 如何在Web应用程序中使用TWAIN驱动
- 下一篇: mysql日期加减问题