首页 > 代码库 > sqlserver分页语句

sqlserver分页语句

select * from (

select row_number() over(order by id) as rowid,*  from table where 1=1 

) tt

select count(1) as countRow from (

select * from table  where 1=1 

) tt

sqlserver分页语句