Which statement is true regarding the effect of the above SQL statement?

Evaluate the following SQL statement:
ALTER TABLE hr.emp SET UNUSED (mgr_id);
Which statement is true regarding the effect of the above SQL statement?

Evaluate the following SQL statement:
ALTER TABLE hr.emp SET UNUSED (mgr_id);
Which statement is true regarding the effect of the above SQL statement?

A.
Any synonym existing on the EMP table would have to be re-created.

B.
Any constraints defined on the MGR_ID column would be removed by the above command.

C.
Any views created on the EMP table that include the MGR_ID column would have to be dropped and re-created.

D.
Any index created on the MGR_ID column would continue to exist until the DROP UNUSED COLUMNS command is executed.



Leave a Reply 9

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


Jipeng

Jipeng

why is c wrong?

create table tst( s1 number, s2 number);

create view vtst as select s1, s2 from tst;

alter table tst set unused(s1);

select * from vtst;
–ORA-04063: view “OE.VTST” has errors

TNK

TNK

C.Any views created on the EMP table that include the MGR_ID column would have to be dropped and re-created.
there is no point of drop and recreate the view.we can just
create or replace view vtst as select s2 from tst;
(ignoring unused column)

cesio.malta

cesio.malta

complementation for studies !!
“would have been discarded and recreated” <= this is not true

Just recreate the "VIEW" it is not necessary to drop.

user

user

create table sally as select * from emp;
create or replace view vw1 as select sal, job from sally;
alter table sally set unused (job);

user

user

When a column is SET UNUSED it is no longer recovered. But only occupy space and could later be dropped using ALTER TABLE table_name DROP UNUSED COLUMNS;

networkmanagers

networkmanagers

Correct answer is

cesio.malta

cesio.malta

complementation for studies !!
“would have been discarded and recreated” <= this is not true

Just recreate the "VIEW" it is not necessary to drop.