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

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

What is the SQL command to add a new record of data in the staff table? a. INSERT INTO staff; b. ADD INTO staff; c. INSERT staff INTO;

a. INSERT INTO staff;

Which of the following SQL statements deletes all records of data from the staff table without deleting the table itself? Select all correct answers. a. TRUNCATE TABLE staff; b. DROP TABLE staff; c. DELETE FROM staff;

a. TRUNCATE TABLE staff; c. DELETE FROM staff;

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)); a. True b. False

a. True

The following SQL statement returns all staff phone numbers from the staff table: SELECT phoneNumber FROM staff; a. True b. False

a. True

Select the right keyword to complete the missing part of the following statement: INSERT INTO staff (ID, name) ___ (7, "Tom"); a. VALUES b. DATA

a. VALUES

EDIT command is used to modify data in a database table. a. True b. False

b. False The UPDATE command is used to modify data in the database.

The following SQL clause creates a table named staff within a database: CREATE staff TABLE; a. True b. False

b. False The table name should be written after the TABLE keyword.

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. a. SELECT name, email AND age FROM staff; b. SELECT name, email, age FROM staff; c. SELECT * FROM staff;

b. SELECT name, email, age FROM staff; c. SELECT * FROM staff;

Which one of the following SQL statements updates the staff email address for the individual named "Karl" in the staff table? a. UPDATE staff SET name = '[email protected]' WHERE email = 'Karl'; b. UPDATE staff SET email = '[email protected]' WHERE name = 'Karl'; c. UPDATE staff WHERE ID = 16 SET email = '[email protected]';

b. UPDATE staff SET email = '[email protected]' WHERE name = 'Karl';

Which is the right command syntax to update the staff table in SQL? a. UPDATE Table staff; b. UPDATE staff;

b. UPDATE staff;


Kaugnay na mga set ng pag-aaral

Ch. 9 - Commercial Package Policy & Commercial Property Coverage

View Set

World History - Economic Systems (Chapter 21)

View Set

Art Final: Japanese and African Art

View Set

Macroeconomics Review Chapter 14

View Set

MAN3600 Mini Quiz Unit 2/Unit 3/Unit 4

View Set

Intro to Business Chapter 14 Review

View Set