0
0
SQLquery~10 mins

LIMIT vs TOP vs FETCH FIRST syntax 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 LIMIT syntax.

SQL
SELECT * FROM employees [1] 5;
Drag options to blanks, or click blank then click option'
ALIMIT
BTOP
CFETCH FIRST
DWHERE
Attempts:
3 left
💡 Hint
Common Mistakes
Using TOP instead of LIMIT in MySQL or PostgreSQL.
Placing LIMIT before FROM clause.
2fill in blank
medium

Complete the code to select the top 3 rows using TOP syntax.

SQL
SELECT [1] 3 * FROM sales;
Drag options to blanks, or click blank then click option'
AFETCH FIRST
BLIMIT
CTOP
DWHERE
Attempts:
3 left
💡 Hint
Common Mistakes
Using LIMIT instead of TOP in SQL Server.
Placing TOP after FROM clause.
3fill in blank
hard

Fix the error in the FETCH FIRST syntax to select 10 rows.

SQL
SELECT * FROM orders [1] 10 ROWS ONLY;
Drag options to blanks, or click blank then click option'
ALIMIT
BTOP
CFETCH NEXT
DFETCH FIRST
Attempts:
3 left
💡 Hint
Common Mistakes
Using LIMIT or TOP keywords with FETCH FIRST syntax.
Omitting ROWS ONLY at the end.
4fill in blank
hard

Fill both blanks to select 7 rows using FETCH FIRST syntax.

SQL
SELECT * FROM products ORDER BY price [1] 7 [2] ONLY;
Drag options to blanks, or click blank then click option'
AFETCH FIRST
BROWS
CROW
DLIMIT
Attempts:
3 left
💡 Hint
Common Mistakes
Using LIMIT instead of FETCH FIRST.
Using ROW instead of ROWS for multiple rows.
5fill in blank
hard

Fill all three blanks to select top 4 rows using TOP syntax with alias.

SQL
SELECT [1] 4 [2] FROM sales_data AS top_sales [3];
Drag options to blanks, or click blank then click option'
ATOP
B*
CWHERE sales > 1000
DLIMIT
Attempts:
3 left
💡 Hint
Common Mistakes
Using LIMIT instead of TOP in SQL Server.
Omitting the WHERE clause when filtering is needed.