Altering Dropping Tables - Quiz Explanation
The correct answers are indicated below, along with text that explains the correct answers.
1.
Which action cannot be done using the
ALTER TABLE
command?
Please select the best answer.
A.
Add a column to a table
B.
Drop a column from a table
C.
Rename a table
D.
Change the storage characteristics of a table
The correct answer is B.
Dropping a column is one of the few ways you cannot modify a table with the
ALTER TABLE
command. You can drop a column by using several different SQL commands.
2.
When you
DROP
a table, you actually delete:
Please select the best answer.
A.
Just the table structure
B.
The table structure and the data it contains
C.
Just the data contained in the table
D.
The table structure, the data the table contains, and the indexes, constraints, and triggers associated with the table
C is the correct answer.
Dropping a table removes all data and database objects directly associated with the table.
3.
How does dropping a table affect other database objects?
Please select the best answer.
A.
Dropping a table never affects other database objects.
B.
Dropping a table can affect other database objects.
C.
Dropping a table can affect other database objects, but Oracle lets you know in advance.
D.
You cannot drop a table in Oracle 8.
B is the correct answer.
Other database objects, such as views based on the dropped table or foreign key constraints that depend on the table, can be made invalid when you drop a table, so B is the correct answer. Oracle does not let you know whether this will happen.