select * from (select * from tablename order by id desc) where rownum <10
在access中如果order by的字段中有重复项则 top n 返回的记录数会大于n,因为有并列项,这时要在order by中加入一个值唯一的字段
分类: Oracle
2009-04-13 10:17:01
select * from (select * from tablename order by id desc) where rownum <10
在access中如果order by的字段中有重复项则 top n 返回的记录数会大于n,因为有并列项,这时要在order by中加入一个值唯一的字段