码迷,mamicode.com
首页 > 数据库 > 详细

分页SQL

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

标签:table   post   where   rownum   sel   and   ble   name   ber   

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

标签:table   post   where   rownum   sel   and   ble   name   ber   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!