Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Dropping Column in a Oracle 8.0.5 database
A copy of this was sent to "Garsen Subramoney" <Garsen_at_netactive.co.za>
(if that email address didn't require changing)
On Tue, 30 Nov 1999 15:14:08 +0200, you wrote:
>I need to drop a column from a table. The table has constraints and
>relationships on it. The table has critical data in it. How do i go about
>dropping that column?
>
>
>Thanks
>
>
DROP COLUMN is available with Oracle8i, release 8.1. It is not available prior to that.
I myself would:
o rename table THAT_TABLE to SOMETHING_ELSE
o alter table something_else modify that_column NULL; -- allow it to be NULL
o create or replace view THAT_TABLE as select <colunms> FROM SOMETHING_ELSE
o drop the grants on SOMETHING_ELSE
o give the grants to THAT_TABLE (which is now a view)
--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Tue Nov 30 1999 - 08:34:08 CST