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 Filmer <filmeraj_at_global.co.za.spam>
Date: Wed, 5 May 1999 23:15:21 +0200
Message-ID: <7gsirf$63u$1@nntp01.global.co.za>


I have done this with multiple imports - first time to import the the data into pre-created tables, next time to add the views, triggers etc. The not null and check constraints imported twice, over and above the constraints on the tables when I created them, so had 3 sets of duplicate constraints.

There must be somebody out there with a de-duping procedure for these. Had a go, but you can't compare long columns to check for duplicates, same problem as the the import utility has.

I eliminated the duplicates by checking the date changed on the constraint - if they weren't part of the original set up, dropped them. This won't work in all cases, happened to be OK this time.

Andrew Filmer

dyrdahl_at_my-dejanews.com wrote in message <7gch5t$s9u$1_at_nnrp1.dejanews.com>...
>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 Wed May 05 1999 - 16:15:21 CDT

Original text of this message

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