关闭

SQLSERVER 使用row_number()分页的sql

标签: sqlserverserverdeletelistsql
2341人阅读 评论(0) 收藏 举报
分类:
--主键
Server_no
 
--主体sql
select row_number()over(order by Server_no desc) as rownum,Server_no,Game_Name,Server_name from T_GameServer_List 

where IS_DELETE = 'N' and Game_name like '%q%' 

--分页sql
select * from (select row_number()over(order by Server_no desc) as rownum,Server_no,Game_Name,Server_name from 

T_GameServer_List where IS_DELETE = 'N' and Game_name like '%q%')as t where rownum>0 and rownum<=10


0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:790501次
    • 积分:9273
    • 等级:
    • 排名:第2085名
    • 原创:197篇
    • 转载:30篇
    • 译文:0篇
    • 评论:67条
    博客专栏