prevent drop of table [message #21425] |
Fri, 02 August 2002 05:45 |
Susan
Messages: 102 Registered: October 2001
|
Senior Member |
|
|
Does anyone know of a way to prevent the drop of a table by all, including the owner? I know I could set up a referential integrity that would throw an error upon dropping, but, I'm wondering if there is another way. Thanks.
|
|
|
|
Re: prevent drop of table [message #21437 is a reply to message #21425] |
Fri, 02 August 2002 12:04 |
Susan
Messages: 102 Registered: October 2001
|
Senior Member |
|
|
thanks Todd -- I looked at Tom's code - this seems to apply across the whole database. Can you have a before drop trigger on a specific schema instead of the whole database? Thanks.
|
|
|
|
Re: prevent drop of table [message #21484 is a reply to message #21425] |
Wed, 07 August 2002 05:50 |
Susan
Messages: 102 Registered: October 2001
|
Senior Member |
|
|
As of 8i you can drop a column from a table.
you can drop a column immediately or you can mark it "unused" to be dropped later
Alter table emp drop column empno;
alter table emp set unused column empno;
marking a column as unused does not release the space previously used by the column until you drop the unused columns
alter table emp drop unused columns;
once you have marked a column as "unused" you cannot access that column
|
|
|