Re: Dropping constraints ??

From: Aniruddha Ghosh <andyg_at_pluto.njcc.com>
Date: 1995/06/23
Message-ID: <3sd7gq$6oj_at_earth.njcc.com>#1/1


Steve Butler (sbut-is_at_seatimes.com) wrote:

: On Tue, 20 Jun 1995, huckleberry wrote:
: > In my haste to create some tables, I put a REFERENCES constraint on a field
: > and did not give the constraint a name, now I need to change the data.
: > I have tried unsuccessly to disable this nameless constraint. Is there no way
: > to disable this constraint ??
 

: First, you can always drop and recreate the table <<grin>>.
 

: However, you might want to look in USER_CONSTRAINTS first (do a describe).
: You should be able to identify the constraint as it will be a TYPE 'R'
: and you can see the reference information in USER_CONSTRAINTS. This same
: table will show you the name being used for that constraint. It will
: start of with SYS and have a bunch of numbers.
 

: Good Luck.
 

: Oh, you can use that system developed name to drop only that constraint.
 

: +----------------------------------------------------+
: | Steve Butler Voice: 206-464-2998 |
: | The Seattle Times Fax: 206-382-8898 |
: | PO Box 70 Internet: sbut-is_at_seatimes.com |
: | Seattle, WA 98111 Packet: KG7JE_at_N6EQZ.WA |
: +----------------------------------------------------+
: All standard and non-standard disclaimers apply.
: All other sources are annonymous.

Instead of all this, simply try to insert some data that you know will violate the constraint. Oracle will come back and say constraint SYS_... violated.
Then you say:
alter table < table> drop constraint SYS_....

andyg_at_pluto.njcc.com Received on Fri Jun 23 1995 - 00:00:00 CEST

Original text of this message