首页 > 数据库技术 > 详细

分页SQL

时间:2018-01-03 22:10:09      阅读:261      评论:0      收藏:0      [点我收藏+]

select top(10) * from Music
where
MusicId not in
(
select top((1-1)*10) MusicId from Music
)

 

 

select top(10) * from Music
where
NameAb like ‘%A%‘ and
MusicId not in
(
select top((1-1)*10) MusicId from Music
where NameAb like ‘%A%‘
)

 

 


select * from
(
select
row_number() over(order by MusicId) as ‘RowNumber‘,
MusicId,TypeId,SingerId,MusicName,NameAb,WordsCount,MusicUrl,BanzouUrl,PlayCount
from Music
) as MyTable
where
RowNumber between 11 and 20
and
NameAb like ‘%%‘

分页SQL

原文:https://www.cnblogs.com/lecj2498/p/8185501.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!