Test: Quiz: Default Values, Merge, and Multi-Table Inserts

Section 1

1. 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 come back later and enter the correct hire_date. This is __________. Mark for Review
(1) Points

A great idea. When a new employee record is entered, if no hire_date is specified, the 0 (zero) will be automatically specified.

A great idea. When new employee records are entered, they can be added faster by allowing the 0's (zeroes) to be automatically specified.

Both a and b are correct.

A bad idea. The default value must match the DATE datatype of the column. (*)


 

2. Which statement below will not insert a row of data onto a table? Mark for Review
(1) Points

INSERT INTO student_table (id, lname, fname, lunch_num)
VALUES (143354, 'Roberts', 'Cameron', 6543);

INSERT INTO student_table
VALUES (143354, 'Roberts', 'Cameron', 6543);

INSERT INTO student_table (id, lname, fname, lunch_num)
VALUES (143352, 'Roberts', 'Cameron', DEFAULT);

INSERT INTO (id, lname, fname, lunch_num)
VALUES (143354, 'Roberts', 'Cameron', 6543); (*)



 

3. A multi-table insert statement must have a subquery at the end of the statement? (True or False) Mark for Review
(1) Points

True (*)

False

 

4. The MERGE statement can be used to update rows in one table based on values in another table and if the update fails, then the rows will automatically be inserted instead. True or False? Mark for Review
(1) Points

True (*)

False


 

5. If a default value was set for a null column, Oracle sets the column to the default value. However, if no default value was set when the column was created, Oracle inserts an empty space. True or False? Mark for Review
(1) Points

True

False (*)


 

6. The MERGE function combines the: Mark for Review
(1) Points

CREATE and UPDATE commands

INSERT and UPDATE commands (*)

ALTER and UPDATE commands

all of the above


 

7. The DEFAULT keyword can be used in the following statements: Mark for Review
(1) Points

INSERT and UPDATE (*)

INSERT and DELETE

DELETE and UPDATE

All of the above


 

8. A multi-table insert statement can insert into more than one table? (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