分页SQL

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 '%%'

posted @ 2018-01-03 20:30  AnotherWinter  阅读(99)  评论(0编辑  收藏  举报