SQL語句如何取前10條?
SQL server:前10條:select top 10 * from 表 order by 需要排序的字段10-30:select * from (select row_number() over (order by 需要排序的字段) as id,* from 表)awhere id between 10 and 30或者select top 21 * from 表where id not in (select top 9 * from 表 order by 需要排序的字段) order by 需要排序的字段oracle:前10條:select * from(select * from 表 order by 需要排序的字段)where rownum