关于rownum的一点认识
rownum是oracle系统顺序分配为从查询返回的行的编号,总是从1开始的伪劣。 要想返回一个表中按某一个字段排序后的2-5列,以下写法是错误的: [@more@]select * from rcpms_fullnote where rownum between 2 and 5 order by serialid; 可以这么写: select * from(select rownum row_id,serialid from (select rownum row_id,serialid,cardnumber from rcpms_fullnote order by serialid)) where row_id between 2 and 5; 注意,上面语句之所以不写成select * from(select rownum row_id,serialid from rcpms_fullnote order by serialid))