From: ddf_dba@my-deja.com
Subject: Re: field deletion
Date: 2000/06/06
Message-ID: <8hjcuc$anr$1@nnrp1.deja.com>#1/1
References: <8hj6ib$57e$1@nnrp1.deja.com> <8hjbdg$99k$1@nnrp1.deja.com>
X-Http-Proxy: 1.0 PROXY, 1.0 x61.deja.com:80 (Squid/1.1.22) for client 38.197.71.100
Organization: Deja.com - Before you buy.
X-Article-Creation-Date: Tue Jun 06 17:38:23 2000 GMT
X-MyDeja-Info: XMYDJUIDddf_dba
Newsgroups: comp.databases.oracle.server
X-Http-User-Agent: Mozilla/4.72 [en] (WinNT; I)


In article <8hjbdg$99k$1@nnrp1.deja.com>,
  ddf_dba@my-deja.com wrote:
> In article <8hj6ib$57e$1@nnrp1.deja.com>,
>   christopher.lewis@ac.com wrote:
> > Hi all, what is the syntax for removing a field (and any
 constraints)
> > from a table during an alter table?  Thanks!
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >
>
> Christopher,
>
> I'm sorry, but you cannot drop a column or a constraint from a table
> even with the alter table command.  The only way to accomplish this is
> to re-create the table without the column or the constraint in the
> specification.  You can disable constraints on a table but you cannot
> drop the constraint without dropping the table.
>
> David Fitzjarrell
> Oracle DBA
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Christopher,

Before I get lambasted for my remarks let me modify them a bit and say
that you CAN drop a constraint from a table with the alter table
command, however you CANNOT drop a column (or field, if you prefer) by
using alter table.  The syntax to drop a constraint is:

alter table <tablename> drop constraint <contraint_name>;

This will drop the constraint from the table.  Sorry for the "brain
fart" on this, but it happens sometimes.


David Fitzjarrell
Oracle DBA


Sent via Deja.com http://www.deja.com/
Before you buy.


