Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

oracle sql limit results

-- Oracle <= 11g 
SELECT * FROM ( SELECT * FROM emp ORDER BY sal DESC ) WHERE ROWNUM <= 5;
	
-- Oracle 12c +
SELECT * FROM emp ORDER BY sal DESC FETCH FIRST 5 ROWS ONLY;	
 
PREVIOUS NEXT
Tagged: #oracle #sql #limit #results
ADD COMMENT
Topic
Name
9+4 =