Deleting Primary Keys
Posted in 2003
Topics: General Discussion
Can describe how to drop a primary key from a table? Thanks, Don Bryant
Don Bryant wrote:
> Can describe how to drop a primary key from a table?
If you gave it a name, then:
ALTER TABLE x DROP CONSTRAINT y;
--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/
Jonathan Leffler wrote:
> Don Bryant wrote:
>
>> Can describe how to drop a primary key from a table?
>
>
> If you gave it a name, then:
>
> ALTER TABLE x DROP CONSTRAINT y;>
And if you don't know the constraint's name ....
ALTER TABLE <table_name> DROP PRIMARY KEY;
--
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan@x.washington.edu
(replace 'x' with a 'u' to reply)
Jonathan Leffler wrote:
> Don Bryant wrote:
>
>> Can describe how to drop a primary key from a table?
>
>
> If you gave it a name, then:
>
> ALTER TABLE x DROP CONSTRAINT y;>
Darn ... I'm bouncing back and forth between too many usenet groups, it
is after midnight and I lost my place. Sorry for the Oracle SQL.
--
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan@x.washington.edu
(replace 'x' with a 'u' to reply)