SQL常用的分页语句

SQL分页查询语句

 

1.TOP分页

 

--分页为10条数据
Select Top 10 * 
From Table
Where Id not in
(
--第几页
 Select Top 1 *
 From Table
Order By Id ASC
)
Order By Id

2

select top 10 * --10 为页大小
from userInfo
where id not in
(
 select top 1 id from userInfo order by id asc
)
order by id

猜你喜欢

转载自blog.csdn.net/qq_40122860/article/details/80367279
今日推荐