Module quiz: Create, Read, Update and Delete (CRUD) Operations

Module quiz: Create, Read, Update and Delete (CRUD) Operations

  1. The following SQL clause creates a table named staff within a database:

    CREATE staff TABLE;

    • False

    • True

  2. The following SQL statement creates a table named staff, with two columns called name and address:

    CREATE TABLE staff (name VARCHAR(100), address VARCHAR(100));

    • False

    • True

  3. What is the SQL command to add a new record of data in the staff table?

    • INSERT staff INTO;

    • ADD INTO staff;

    • INSERT INTO staff;

  4. Which is the right command syntax to update the staff table in SQL?

    • UPDATE staff;

      UPDATE Table staff;

  5. EDIT command is used to modify data in a database table.

    • False

    • True

  6. Which one of the following SQL statements updates the staff email address for the individual named “Karl” in the staff table?

  7. Select the right keyword to complete the missing part of the following statement:

    INSERT INTO staff (ID, name) ___ (7, “Tom”);

    • VALUES

    • DATA

  8. A staff table consists of three columns called name, email and age. Which of the following SQL statements selects all available data in all three columns in the staff table?

    Select all correct answers.

    • SELECT name, email, age FROM staff;

    • SELECT * FROM staff;

    • SELECT name, email AND age FROM staff;

  9. The following SQL statement returns all staff phone numbers from the staff table:

    SELECT phoneNumber FROM staff;

    • False

    • True

  10. Which of the following SQL statements deletes all records of data from the staff table without deleting the table itself?

    Select all correct answers.

    • TRUNCATE TABLE staff;

    • DROP TABLE staff;

    • DELETE FROM staff;