sql restrict rows returned code example
Example 1: sql limit to 5 results
SELECT expressions
FROM tables
[WHERE conditions]
[ORDER BY expression [ ASC | DESC ]]
LIMIT number_rows [ OFFSET offset_value ];
Example 2: rownum in sql
SELECT ROWNUM, a.*
FROM (SELECT customers.*
FROM customers
WHERE customer_id > 4500
ORDER BY last_name) a;