select * from books
where 1=1
and categoryid=29
and title like('%ASP.NET%')
and unitprice>10
order by id
Select top 20 * from books order by id
--m:每页显示行数 n:当前页数
select Top m * from books
where id not in
(Select top m(n-1) id from books order by id)
order by id
select * from
(select Row_number() over(order by id) as num,
* from books) as table1
where num between 21 and 30