Quiz DP 12
Quiz DP 12
Quiz DP 12
True
False (*)
Correct
2. In developing the Employees table, you create a column called hire_date. You assign
the hire_date column a DATE datatype with a DEFAULT value of 0 (zero). A user can Mark for Review
come back later and enter the correct hire_date. This is __________. (1) Points
(*)
INSERT INTO student_table
VALUES (143354, 'Roberts', 'Cameron', 6543);
Correct
4. Using MERGE accomplishes an __________ and __________ simultaneously.
Mark for Review
(1) Points
UPDATE; SELECT
INSERT; SELECT
INSERT; UPDATE (*)
UPDATE; DELETE
Correct
5. Aliases can be used with MERGE statements. True or False?
Mark for Review
(1) Points
True (*)
False
Correct
Section 12 Quiz
(Answer all questions in this section)
6. One of the sales representatives, Janet Roper, has informed you that she was recently
married, and she has requested that you update her name in the employee database. Mark for Review
Her new last name is Cooper. Janet is the only person with the last name of Roper (1) Points
that is employed by the company. The EMPLOYEES table contains these columns and
all data is stored in lowercase:
Correct
8. Which two commands can be used to modify existing data in a database row?
Mark for Review
(1) Points
(Choose all correct answers)
UPDATE (*)
SELECT
MERGE (*)
DELETE
Correct
10. One of your employees was recently married. Her employee ID is still 189, however,
her last name is now Rockefeller. Which SQL statement will allow you to reflect this Mark for Review
change? (1) Points
Section 12 Quiz
(Answer all questions in this section)
11. Which statement about the VALUES clause of an INSERT statement is true?
Mark for Review
(1) Points
If no column list is specified, the values must be listed in the same order that the
columns are listed in the table. (*)
To specify a null value in the VALUES clause, use an empty string (" ").
The VALUES clause in an INSERT statement is mandatory in a subquery.
Character, date, and numeric data must be enclosed within single quotes in the
VALUES clause.
Correct
12. DML is an acronym that stands for:
Mark for Review
(1) Points
Debit Markup Language
Data Markup Language
Don't Manipulate Language
Data Manipulation Language (*)
Correct
13. When inserting rows into a table, all columns must be given values. True or False?
Mark for Review
(1) Points
True
False (*)
Correct
14. Which of the following statements will add a new customer to the customers table in
the Global Fast Foods database? Mark for Review
(1) Points
INSERT IN customers (id, first_name, last_name, address, city, state, zip,
phone_number);
INSERT INTO customers (id, first_name, last_name, address, city, state, zip,
phone_number)
VALUES (145, 'Katie', 'Hernandez', '92 Chico Way', 'Los Angeles', 'CA', 98008,
8586667641);
(*)
INSERT INTO customers
(id 145, first_name 'Katie', last_name 'Hernandez', address '92 Chico Way', city
'Los Angeles', state 'CA', zip 98008, phone_number 8586667641);
INSERT INTO customers (id, first_name, last_name, address, city, state, zip,
phone_number)
VALUES ("145", 'Katie', 'Hernandez', '92 Chico Way', 'Los Angeles', 'CA', "98008",
"8586667641");
Correct
15. Assume all the column names are correct. The following SQL statement will execute
which of the following? Mark for Review
(1) Points
INSERT INTO departments
(department_id, department_name, manager_id, location_id)
VALUES (70, 'Public Relations', 100, 1700);
100 will be inserted into the department_id column.
1700 will be inserted into the manager_id column.
'Public Relations' will be inserted into the manager_name column.
70 will be inserted into the department_id column. (*)
Correct