SQL Assessment

SQL Assessment

  1. Which SQL statement is used to retrieve data from a database?

    a) SELECT b) FETCH c) EXTRACT
  2. What does SQL stand for?

    a) Structured Query Language b) Scripting Query Language c) Structured Query Logic
  3. Which SQL clause is used to filter records in a SELECT statement?

    a) WHERE b) HAVING c) FILTER
  4. What is the result of the SQL query: SELECT COUNT(*) FROM Customers;

    a) The number of records in the Customers table b) The number of unique cities in the Customers table c) The total order count for all customers
  5. Which SQL statement is used to update data in a database?

    a) MODIFY b) UPDATE c) ALTER
  6. What is the SQL command to delete all records from a table without deleting the table itself?

    a) DROP TABLE b) DELETE ALL c) TRUNCATE TABLE
  7. Which SQL keyword is used to sort the result set in ascending order?

    a) ASC b) SORT c) ORDER BY
  8. What does the SQL JOIN clause do?

    a) Combines rows from two or more tables based on a related column b) Removes duplicate records from a table c) Creates a new table by combining two or more tables