日期:2014-05-18  浏览次数:20524 次

求真知
我写了这个 
sql="select top 3 * from zm_news where fid = 22 order by ord asc,id desc"
查询的是前三条记录

那么 我要查第4到第六条记录要怎么写??
跪求大虾解谜!!

------解决方案--------------------
SQL code
select * from
(select rn=row_number()over(order by ord asc,id desc), * from zm_news) t
where rn between 4 and 6