4. View the Exhibit and examine the structure of the EMP table which is not partitioned and not an indexorganized table. Evaluate the following SQL statement:
ALTER TABLE emp DROP COLUMN first_name;
Which two statements are true regarding the above command? (Choose two.)
A. The FIRST_NAME column would be dropped provided it does not contain any data.
B. The FIRST_NAME column would be dropped provided at least one or more columns remain in the table.
C. The FIRST_NAME column can be rolled back provided the SET UNUSED option is added to the above SQL statement.
D. The FIRST_NAME column can be dropped even if it is part of a composite PRIMARY KEY provided the CASCADE option is used.
答案: BD
分析: 本题考点是set unused
EMP表不是分区表也不是所引组织表,drop columns是物理删除,set unused是逻辑删除,两者都不可以通过rollback恢复,所有引用到该列的对象都会失败。
A. 不管列上有没有数据,删除列的命令都可以正常执行。
ALTER TABLE emp DROP COLUMN first_name;
Which two statements are true regarding the above command? (Choose two.)
A. The FIRST_NAME column would be dropped provided it does not contain any data.
B. The FIRST_NAME column would be dropped provided at least one or more columns remain in the table.
C. The FIRST_NAME column can be rolled back provided the SET UNUSED option is added to the above SQL statement.
D. The FIRST_NAME column can be dropped even if it is part of a composite PRIMARY KEY provided the CASCADE option is used.
答案: BD
分析: 本题考点是set unused
EMP表不是分区表也不是所引组织表,drop columns是物理删除,set unused是逻辑删除,两者都不可以通过rollback恢复,所有引用到该列的对象都会失败。
A. 不管列上有没有数据,删除列的命令都可以正常执行。
C. set unused的列无法访问,无法使用rollback撤销unused设置