0
0
SQLquery~20 mins

SQL statement categories (DDL, DML, DQL, DCL) - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
SQL Statement Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Identify the category of the SQL statement
Which category does the following SQL statement belong to?
CREATE TABLE Students (ID INT, Name VARCHAR(100));
AData Definition Language (DDL)
BData Manipulation Language (DML)
CData Query Language (DQL)
DData Control Language (DCL)
Attempts:
2 left
💡 Hint
Think about whether this statement changes the structure of the database or the data inside it.
🧠 Conceptual
intermediate
2:00remaining
Classify the SQL statement type
What category does this SQL statement belong to?
SELECT * FROM Employees WHERE Department = 'Sales';
AData Control Language (DCL)
BData Manipulation Language (DML)
CData Query Language (DQL)
DData Definition Language (DDL)
Attempts:
2 left
💡 Hint
This statement retrieves data without changing it.
query_result
advanced
2:00remaining
Determine the effect of a DML statement
What will be the result of this SQL statement?
INSERT INTO Products (ID, Name) VALUES (101, 'Pen');
SELECT COUNT(*) FROM Products;

Assuming the Products table initially has 5 rows.
AError: Cannot insert duplicate ID
B5
C0
D6
Attempts:
2 left
💡 Hint
INSERT adds a new row to the table.
📝 Syntax
advanced
2:00remaining
Identify the correct DCL statement syntax
Which of the following SQL statements correctly grants SELECT permission on the Customers table to user 'Alice'?
AGRANT SELECT ON Customers TO Alice;
BGRANT SELECT FROM Customers TO Alice;
CGRANT SELECT Customers TO Alice;
DGRANT SELECT ON Customers FOR Alice;
Attempts:
2 left
💡 Hint
The correct syntax uses ON before the table name.
🔧 Debug
expert
2:00remaining
Find the error in this mixed SQL statement
What error will this SQL code produce?
UPDATE Orders SET Status = 'Shipped' WHERE OrderID = 123;
GRANT DELETE ON Orders TO Bob;
ARuntime error on UPDATE statement
BNo error, both statements run successfully
CSyntax error on GRANT statement
DPermission error on UPDATE statement
Attempts:
2 left
💡 Hint
Both UPDATE and GRANT are valid statements in their categories.