As the project requires, look for the first few records in the Oracle table, oralcle by a rownum that can be used directly to get the required number of records, but the first SQL I used was: SELECT * from table where rownum< The number of records you want to check, although you can take out the first few records, but I found that if the sorting postscript to accept the first few results are not, that is, the SQL statement is as follows: SELECT * FROM table where rownum< the number of records you want to check by field name DESC, At run time, I found that: take out is not sorted by first after the first few, but first to remove the first several reorder , and I need to achieve the first sort and then take the first few, so select * FROM (SELECT * from the table order by field name Desc) w Here rownum< the number of records you want to check so that you can meet the criteria.