MySQL Basics u0026 Concepts Quiz Quiz

  1. Purpose of MySQL

    Which statement best describes MySQL?

    1. A relational database management system
    2. A data visualization tool
    3. A web browser extension
    4. An operating system
    5. A blockchain technology
  2. Data Types

    Which of the following is NOT a valid data type in MySQL?

    1. NUMBER
    2. VARCHAR
    3. DATE
    4. TEXT
    5. FLOAT
  3. Primary Key

    What is the main purpose of a primary key in a database table?

    1. To uniquely identify each record in the table
    2. To increase query speed
    3. To encrypt the data in the table
    4. To allow duplicate records
    5. To create foreign keys in other tables
  4. Foreign Key

    What does a foreign key in a table establish?

    1. A link between two tables based on a shared column
    2. A way to avoid duplicate rows
    3. A hidden column in the table
    4. A method for sorting data
    5. A shortcut to accessing the database
  5. CHAR vs VARCHAR

    What is the main difference between CHAR and VARCHAR data types?

    1. CHAR has fixed length, VARCHAR has variable length
    2. CHAR is used for numbers only
    3. VARCHAR can store only dates
    4. CHAR types can store only lowercase letters
    5. VARCHAR automatically encrypts data
  6. AUTO_INCREMENT Feature

    What does the AUTO_INCREMENT attribute do in MySQL tables?

    1. Automatically increases the value of a numeric column with each new row
    2. Decreases the value of a column with every update
    3. Encrypts the column as data is added
    4. Prevents NULL values in the column
    5. Automatically creates an index on the column
  7. JOIN Clause

    What is the main purpose of the JOIN clause in SQL?

    1. To combine data from two or more tables based on a related column
    2. To permanently delete a table
    3. To reorder table rows alphabetically
    4. To encrypt selected columns
    5. To backup the entire database
  8. INNER JOIN

    What does the INNER JOIN clause return?

    1. Rows with matching values in both tables
    2. All rows from the left table
    3. All rows from the right table
    4. Rows with only NULL values
    5. Random rows from both tables
  9. GROUP BY Use

    Why would you use the GROUP BY clause in a SQL query?

    1. To arrange identical data into summary rows
    2. To delete duplicate rows
    3. To filter out NULL values
    4. To automatically increase column values
    5. To restrict users from accessing the table
  10. UNION vs UNION ALL

    What is the primary difference between UNION and UNION ALL in SQL?

    1. UNION removes duplicate records; UNION ALL includes duplicates
    2. UNION ALL sorts data automatically
    3. UNION encrypts the results
    4. UNION can only be used with one table
    5. There is no difference; both work identically