Complete the code to limit the query to 5 rows.
SELECT * FROM products [1] 5;
The LIMIT clause restricts the number of rows returned by the query. Here, LIMIT 5 returns only 5 rows.
Complete the code to skip the first 10 rows and return the next 5 rows.
SELECT * FROM products [1] 5 OFFSET 10;
The LIMIT clause specifies how many rows to return, and OFFSET skips the first rows. Here, LIMIT 5 OFFSET 10 skips 10 rows and returns the next 5.
Fix the error in the query to paginate results correctly.
SELECT * FROM orders LIMIT [1] OFFSET 20;
The query should return 10 rows after skipping 20. Using LIMIT 10 OFFSET 20 correctly paginates the results.
Fill both blanks to select 15 rows starting from the 5th row.
SELECT * FROM customers [1] 15 [2] 5;
Use LIMIT 15 OFFSET 5 to get 15 rows starting after skipping 5 rows.
Fill all three blanks to paginate the 'employees' table: skip 25 rows, return 10 rows, ordered by 'id'.
SELECT * FROM employees [1] id [2] 10 [3] 25;
The query orders rows by id, then limits to 10 rows, skipping the first 25 rows using ORDER BY id LIMIT 10 OFFSET 25.