Is it possible to display only 20 items of the whole result? I know of a query "rownum>=20" but that only makes the sql check only the first 20 rows in the table. But i want the sql to check my whole table and display only the highest 20 entries.
To be clear, I have a table with job description like Title, description, agency, salary_min, salary max. I want to display the 20 highest paying jobs.
The "highest" 20 entries suggests a sort. You would do something like this:
If you are using Oracle 12g or more recent, you can use the
fetch first
clause instead: