Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: multiple identical constraints

Re: multiple identical constraints

From: Andrew Babb <andrewb_at_mail.com>
Date: Sat, 01 May 1999 09:04:30 +0800
Message-ID: <372A531D.50A0139B@mail.com>


Hi,

I have actually done this, with CHECK constraints, and it is done by simply running the same ADD CONSTRAINT clause against a table. This generally happened on development boxes, but it did occur once or twice on production boxes.

My understanding is that since the constraint is stored in a LONG column, Oracle does not check to see if the constraint already exists when the constraint is being added.

As far as NOT NULL's this could be due to adding Primary or Unique Key constraints to a table.

Technically, if you drop the extra constraints nothing should happen, but I might want to check this with a dummy table.

Andrew

dyrdahl_at_my-dejanews.com wrote:

> I am working on a database which someone else created. This is an Oracle 8
> database running on a NT server. I believe that the tables, indexes, etc.
> were originally created using the graphical interface provided by Oracle. I
> was looking at the all_con_columns view and noticed that there are numerous
> columns which have duplicate constraints.
>
> In other words, they created a column with a not null constraint. However,
> there are actually two not null constraints for the same column. I am
> assuming that this is a bad idea since every update/insert will check the
> same condition twice.
>
> Before I go and drop a bunch of these constraints, I wanted to know if anyone
> could see why there would be two and also if it matters which one of the two
> that I drop? Thanks.
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Received on Fri Apr 30 1999 - 20:04:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US