Test: Quiz: Modifying a Table

Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.

Section 1

1. To completely get rid of a table, its contents, its structure, AND release the storage space the keyword is:
Mark for Review
(1) Points
DROP (*)
DELETE
TRUNCATE
KILL
 

2.The following code creates a table named student_table with four columns: id, lname, fname, lunch_num CREATE TABLE student_table
(id NUMBER(6),
lname VARCHAR(20),
fname VARCHAR(20),
lunch_num NUMBER(4)); 
The lunch_num column in the above table has been marked as UNUSED. Which of the following is the best statement you can use if you wish to remove the UNUSED column from the student_table?

Mark for Review

(1) Points
DROP column
ALTER TABLE DELETE UNUSED COLUMNS
ALTER TABLE DROP UNUSED COLUMNS (*)
ALTER TABLE DELETE ALL COLUMNS

 

3.You can use DROP COLUMN to drop all columns in a table, leaving a table structure with no columns. True or False?

Mark for Review

(1) Points
True
False (*)

 

4.Which of the following will correctly change the name of the LOCATIONS table to NEW_LOCATIONS?

Mark for Review

(1) Points
ALTER TABLE LOCATIONS RENAME NEW_LOCATIONS
MODIFY TABLE LOCATIONS RENAME NEW_LOCATIONS
RENAME LOCATIONS TO NEW_LOCATIONS (*)
None of the above; you cannot rename a table, you can only CREATE, ALTER and DROP a table.

 

5.When should you use the SET UNUSED command?

Mark for Review

(1) Points
Never, there is no SET UNUSED command
You should use it if you think the column may be needed again later
You should use it when the system is being heavily used (*)
You should only use this command if you want the column to still be visible when you DESCRIBE the table

 

6. Comments can be added to a table by using the COMMENT ON TABLE statement. The comments being added are enclosed in:

Mark for Review

(1) Points
Double quotes " "
Single quotes ' ' (*)
Parentheses ( )
Brackets { }

 

7. You can use the ALTER TABLE statement to:

Mark for Review

(1) Points
Add a new column
Modify an existing column
Drop a column
All of the above (*)

 

8. When you use ALTER TABLE to add a column, the new column:
Mark for Review
(1) Points

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