Q&A
Q&AHow does top-N syntax differ across PostgreSQL, MySQL, and Oracle?
PostgreSQL and MySQL commonly use LIMIT; Oracle supports FETCH FIRST and legacy ROWNUM patterns.
Read the concise answer
PostgreSQL and MySQL support ORDER BY with LIMIT; standard FETCH FIRST syntax is also available in modern versions. Oracle supports FETCH FIRST in current versions; older ROWNUM queries must sort in an inner query before limiting in an outer query. Always specify deterministic ordering and test the exact target version.