0
0
SQLquery~10 mins

TOP vs LIMIT across databases in SQL - Interactive Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to select the first 5 rows using SQL Server syntax.

SQL
SELECT [1] 5 * FROM Employees;
Drag options to blanks, or click blank then click option'
ALIMIT
BROWNUM
CTOP
DFETCH
Attempts:
3 left
💡 Hint
Common Mistakes
Using LIMIT which is for MySQL/PostgreSQL.
Using FETCH which is part of OFFSET-FETCH syntax.
2fill in blank
medium

Complete the code to select the first 10 rows using MySQL syntax.

SQL
SELECT * FROM Customers [1] 10;
Drag options to blanks, or click blank then click option'
ALIMIT
BTOP
CFETCH
DROWNUM
Attempts:
3 left
💡 Hint
Common Mistakes
Using TOP which is not valid in MySQL.
Placing LIMIT before FROM clause.
3fill in blank
hard

Fix the error in this PostgreSQL query to limit results to 3 rows.

SQL
SELECT * FROM Orders [1] 3;
Drag options to blanks, or click blank then click option'
ALIMIT
BTOP
CFETCH FIRST
DROWNUM
Attempts:
3 left
💡 Hint
Common Mistakes
Using TOP which is for SQL Server.
Using FETCH FIRST without OFFSET.
4fill in blank
hard

Fill both blanks to select the first 7 rows in Oracle 12c or later.

SQL
SELECT * FROM Products [1] [2] 7 ROWS ONLY;
Drag options to blanks, or click blank then click option'
AFETCH
BLIMIT
CFIRST
DTOP
Attempts:
3 left
💡 Hint
Common Mistakes
Using LIMIT which is not supported in Oracle.
Using TOP which is for SQL Server.
5fill in blank
hard

Fill all three blanks to select the first 4 rows in Oracle 12c+ with full syntax.

SQL
SELECT * FROM Sales ORDER BY SaleDate [1] [2] 4 [3];
Drag options to blanks, or click blank then click option'
AFETCH
BFIRST
CROWS ONLY
DLIMIT
Attempts:
3 left
💡 Hint
Common Mistakes
Using LIMIT which is not valid in Oracle.
Omitting ROWS ONLY at the end.