SQL Knowledge Challenge Quiz Quiz

  1. Basic CRUD Operations

    Which SQL statement is used to add a new record into a table?

    1. INSERT
    2. INNERT
    3. INSRT
    4. ENTR
    5. INPUT
  2. Transactions in SQL

    What is the purpose of a SQL TRANSACTION when performing multiple database operations?

    1. To ensure all operations succeed or none are saved
    2. To only allow select queries
    3. To permanently delete data
    4. To create a backup of the table
    5. To sort the data by default
  3. SQL SELECT Syntax

    Which keyword is used to filter the number of rows returned by a SQL SELECT query?

    1. WHERE
    2. LIMIT
    3. WHILE
    4. CUT
    5. BOUNDRY
  4. Table Creation Basics

    How do you create a new table named 'users' with SQL?

    1. CREATE TABLE users (...);
    2. MAKE TABLE users (...);
    3. ADD TABLE users (...);
    4. GEN TABLE users (...);
    5. BUILD TABLE users (...);
  5. Updating Data

    Which keyword updates existing records in a SQL table?

    1. UPDATE
    2. UPDAT
    3. CHNAGE
    4. REVISE
    5. INSERT
  6. Deleting Records

    How would you remove all records from a table called 'products' without deleting the table?

    1. DELETE FROM products;
    2. REMOVE TABLE products;
    3. DROP products;
    4. ERASE TABLE products;
    5. CUT FROM products;
  7. Relational Database Features

    Which concept ensures each value in a column is unique in a relational database?

    1. UNIQUE constraint
    2. PRIMARY key
    3. FOREIGN kay
    4. IDX unique
    5. CONST uniq
  8. SQL and Environment Variables

    Why is it a good practice to store database connection details in an environment file?

    1. To protect sensitive information
    2. To optimize query performance
    3. To create backups automatically
    4. To increase transaction speed
    5. To enable multi-threading
  9. SQL Query Errors

    What will likely happen if you try to use transactions with a pool.query method in PostgreSQL?

    1. You will encounter unexpected transactional problems
    2. All queries will be twice as fast
    3. The table will be dropped
    4. Indexes will automatically update
    5. Nothing will happen
  10. SQL Data Persistence with Docker

    How can you keep your database data intact even after stopping a Dockerized SQL service?

    1. By using a data volume for the database service
    2. By not running any queries
    3. By stopping the server gracefully
    4. By increasing memory allocation
    5. By setting auto_commit to TRUE