1.连续的几条记录
用 between and
2.选择性的相隔的几条记录
用 nsort_id in(5,8,10)
sql="select top 1 * from nsort where nsort_id in(5,8,10) order by nsort_id desc"
1:取第5-第8条:select top 3 * from nsort where nsort_id not in(select top 4 nsort_id from nsort order by nsort_id desc) order by nsort_id desc
2:不知道,期待答案。
select top 5 * from product where productid<100 order by productid desc
union