取排序后的前10条记录,注意merchantid是自增长,可能不连续
select * from (select * from merchants order by merchantid asc) where rownum<11;
取排序后的第5到第10条记录
select merchantid from (select * from merchants order by merchantid asc) where rownum<=10 minus select merchantid from (select * from merchants order by merchantid asc) where rownum<6;
发表于 @ 2008年08月20日 10:29:00 | 评论( loading... ) | 举报| 收藏