SQL Basics Quiz Quiz

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.

  1. Selecting Columns

    Which SQL statement would retrieve the 'name' and 'age' columns from a table called 'students'?

    1. SELECT name, age FROM students;
    2. GET name, age IN students;
    3. PICK name age BY students;
    4. SELECT name.age OF students;
    5. CHOOSE name AND age FROM students;
  2. Filtering Data

    How would you select all rows from a table named 'products' where the price is greater than 50?

    1. SELECT ALL FROM products WHEN price u003E 50;
    2. SELECT * FROM products IF price u003E 50;
    3. SELECT * FROM products WHERE price u003E 50;
    4. SELECT * products price u003E 50;
    5. GET * FROM products WHERE price u003E 50;
  3. SQL Keyword for Removing Rows

    Which SQL command would you use to remove all rows from the 'orders' table?

    1. DELETE FROM orders;
    2. ERASE FROM orders;
    3. CLEAR orders;
    4. REMOVE ALL orders;
    5. DROP orders;
  4. Ordering Query Results

    What keyword should be used to arrange the results of a query by ascending order of the 'score' column?

    1. GROUP BY score ASC;
    2. ORDER score ASC;
    3. SORT score UP;
    4. SEQUENCE score ASC;
    5. ORDER BY score ASC;
  5. SQL Syntax for Inserting Data

    Which statement correctly inserts a new row into the 'employees' table with values (1, 'Alex') for 'id' and 'name'?

    1. INSERT employees (id, name) (1, 'Alex');
    2. PUSH employees (1, 'Alex');
    3. ADD INTO employees VALUES (1, 'Alex');
    4. INSERT INTO employees (id, name) VALUES (1, 'Alex');
    5. CREATE employees VALUES 1, 'Alex';