1-- MySql
2SELECT * FROM emp ORDER BY sal DESC LIMIT 5;
3-- SQL Server
4SELECT TOP 5 * FROM emp ORDER BY sal DESC;
5-- Oracle < 11g
6SELECT * FROM ( SELECT * FROM emp ORDER BY sal DESC ) WHERE ROWNUM <= 5;
7-- Oracle 12c +
8SELECT * FROM emp ORDER BY sal DESC FETCH FIRST 5 ROWS ONLY;
1SELECT expressions
2FROM tables
3[WHERE conditions]
4[ORDER BY expression [ ASC | DESC ]]
5LIMIT number_rows [ OFFSET offset_value ];