SQLSERVER 使用row_number()分页的sql

--主键
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


你可能感兴趣的:(sql,server,list,delete,sqlserver)