SQL Select TOP & more

1. Select Top SQL provides several ways to limit the number of rows returned in a query result, including: Syntax: example: 2. LIMIT Clause (MySQL, PostgreSQL) syntax: example: 3. FETCH FIRST Clause (DB2, Oracle) syntax: example: 4. ROWNUM Clause (Oracle) syntax: SELECT [column1, column2, …]FROM (SELECT [column1, column2, …], ROWNUM as row_numberFROM table_name)WHERE row_number <= …

SQL Select TOP & more Read More »