0
0
SQLquery~20 mins

What is SQL - Practice Questions & Exercises

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
SQL Beginner Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:00remaining
What does SQL stand for?
Choose the correct full form of SQL.
ASequential Question Logic
BSimple Query List
CStandard Question Language
DStructured Query Language
Attempts:
2 left
💡 Hint
Think about the language used to ask questions to databases.
🧠 Conceptual
intermediate
1:30remaining
What is the main purpose of SQL?
What is SQL mainly used for in databases?
ATo create and manage database structures and data
BTo design website layouts
CTo write software applications
DTo manage operating system files
Attempts:
2 left
💡 Hint
SQL helps you work with data stored in databases.
query_result
advanced
2:00remaining
What is the output of this SQL query?
Given the table Users with columns id and name, what will this query return?

SELECT name FROM Users WHERE id = 3;
SQL
CREATE TABLE Users (id INT, name VARCHAR(20));
INSERT INTO Users VALUES (1, 'Alice'), (2, 'Bob'), (3, 'Charlie');
ABob
BCharlie
CAlice
DNo rows returned
Attempts:
2 left
💡 Hint
Look for the row where id equals 3.
📝 Syntax
advanced
1:30remaining
Which SQL statement is syntactically correct to create a table?
Choose the correct SQL statement to create a table named Products with columns product_id (integer) and product_name (text).
ACREATE TABLE Products (product_id INT, product_name TEXT);
BTABLE CREATE Products (product_id INT, product_name TEXT);
CCREATE Products TABLE (product_id INT, product_name TEXT);
DCREATE TABLE Products product_id INT, product_name TEXT;
Attempts:
2 left
💡 Hint
The correct syntax starts with CREATE TABLE followed by the table name and columns in parentheses.
🧠 Conceptual
expert
2:00remaining
Which SQL command is used to remove all rows from a table but keep the table structure?
Select the SQL command that deletes all data from a table but does not delete the table itself.
AREMOVE FROM table_name;
BDROP TABLE table_name;
CTRUNCATE TABLE table_name;
DDELETE FROM table_name;
Attempts:
2 left
💡 Hint
This command is faster than DELETE and resets identity counters.