Which two statements is true regarding the above command?

View the Exhibit and examine the structure of the EMP table which is not partitioned and not an index- organized table. Evaluate the following SQL statement:
ALTER TABLE emp
DROP COLUMN first_name;
Which two statements is true regarding the above command? (Choose two.)

View the Exhibit and examine the structure of the EMP table which is not partitioned and not an index- organized table. Evaluate the following SQL statement:
ALTER TABLE emp
DROP COLUMN first_name;

Which two statements is 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.



Leave a Reply 3

Your email address will not be published. Required fields are marked *


user

user

create table empx as select sal from emp;
desc empx;
ALTER TABLE empx DROP COLUMN sal2;
ALTER TABLE empx add (sal2 number);

ORA-12983: cannot drop all columns in a table

user

user

SET UNUSED also works the same way as DROP column
1. At least one column must be retained.
2. CASCADE option can be used

alis

alis

ALTER TABLE table-Name
{
ADD COLUMN column-definition |
ADD CONSTRAINT clause |
DROP [ COLUMN ] column-name [ CASCADE | RESTRICT ]
DROP { PRIMARY KEY | FOREIGN KEY constraint-name | UNIQUE
constraint-name | CHECK constraint-name | CONSTRAINT constraint-name }
ALTER [ COLUMN ] column-alteration |
LOCKSIZE { ROW | TABLE }
}