取排序后的前几行,应该用:select * from(select * from test order by stamp desc) where rownum<= 6 (表示排序后取前几行)而不应该使用:select * from test where rownum<= 6 order by stamp desc (表示取前几行后再排序)