Assess your fundamental knowledge of SQL, including common commands, syntax, and essential concepts. This quiz is designed for beginners seeking to test their understanding of SQL Level 1 topics.
Selecting Columns
Which SQL statement would retrieve the 'name' and 'age' columns from a table called 'students'?
- SELECT name, age FROM students;
- GET name, age IN students;
- PICK name age BY students;
- SELECT name.age OF students;
- CHOOSE name AND age FROM students;
Filtering Data
How would you select all rows from a table named 'products' where the price is greater than 50?
- SELECT ALL FROM products WHEN price u003E 50;
- SELECT * FROM products IF price u003E 50;
- SELECT * FROM products WHERE price u003E 50;
- SELECT * products price u003E 50;
- GET * FROM products WHERE price u003E 50;
SQL Keyword for Removing Rows
Which SQL command would you use to remove all rows from the 'orders' table?
- DELETE FROM orders;
- ERASE FROM orders;
- CLEAR orders;
- REMOVE ALL orders;
- DROP orders;
Ordering Query Results
What keyword should be used to arrange the results of a query by ascending order of the 'score' column?
- GROUP BY score ASC;
- ORDER score ASC;
- SORT score UP;
- SEQUENCE score ASC;
- ORDER BY score ASC;
SQL Syntax for Inserting Data
Which statement correctly inserts a new row into the 'employees' table with values (1, 'Alex') for 'id' and 'name'?
- INSERT employees (id, name) (1, 'Alex');
- PUSH employees (1, 'Alex');
- ADD INTO employees VALUES (1, 'Alex');
- INSERT INTO employees (id, name) VALUES (1, 'Alex');
- CREATE employees VALUES 1, 'Alex';