Test: Quiz: Insert Statement

Section 1

1. What is the quickest way to use today's date when you are creating a new row? Mark for Review

(1) Points

Simply write today's date in the format of 'dd-mon-rr'.

Simply use the keyword DATE in the insert statement.

Use the SYSDATE function. (*)

Use the TODAYS_DATE function.

 

2. When inserting rows into a table all columns must be given values. True or False? Mark for Review

(1) Points

True

False (*)

 

3. To return a table summary on the customers table, which of the following is correct? Mark for Review

(1) Points

SHOW customers, or SEE customers

DISTINCT customers, or DIST customers

DESCRIBE customers, or DESC customers (*)

DEFINE customers, or DEF customers

 

4. If the employees table have 7 rows how many rows are inserted into the copy_emps table with the following statement:

INSERT INTO copy_emps (employee_id, first_name, last_name, salary, department_id)

SELECT employee_id, first_name, last_name, salary, department_id

FROM employees

Mark for Review

(1) Points

No rows, as you cannot use subqueries in an insert statement.

7 rows, as there is no WHERE-clause on the subquery. (*)

No rows, as the SELECT statement is invalid.

10 rows will be created.

 

5. Is it possible to insert more than one row at a time using an INSERT statement with a VALUES clause? Mark for Review

(1) Points

No, you can only create one row at a time when using the VALUES clause. (*)

Yes, you can just list as many rows as you want, just remember to separate the rows with commas.

No, there is no such thing as INSERT ... VALUES.

 

6. 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, 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);

 

7. When inserting a new row the null keyword can be included in the values list for any null column. True or False? Mark for Review

(1) Points

True (*)

 

8. DML is an acronym that stands for: Mark for Review

(1) Points

Debit Markup Language

Don't Manipulate Language

Data Markup Language

Data Manipulation Language (*)

 

9. Insert statements can be combined with subqueries to create more than one row per statement. True or False? Mark for Review

(1) Points

True (*)

False

Solution for Test: Quiz: Introduction to The Oracle Academy
Solution for Test: Quiz: Data vs Information
Top