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: Confused about "check" style constraunts

Re: Confused about "check" style constraunts

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Tue, 21 Aug 2001 20:22:16 +0200
Message-ID: <to59ms694kgg1f@news.demon.nl>

"Stan Brown" <stanb_at_panix.com> wrote in message news:9lu7pj$m59$1_at_panix3.panix.com...
> In <6swg7.24222$wX5.1749360_at_news20.bellglobal.com> "Stephen Bell"
<stephen.bell_at_cgi.ca> writes:
>
> >Hi Stan,
>
> >I'd bet even Jonathan's salary (kidding Jonathan :) that you've got a
> >cartesian product; at least you imply that because you state one of the
> >tables has only 62 rows...depending on what you need, try starting with
> >something like:
>
> >SELECT CONSTRAINT_NAME FROM USER_CONSTRAINTS
> >WHERE CONSTRAINT_TYPE = 'C' ;
>
> You mean, like this, right?
>
> select
> count(CONSTRAINT_NAME)
> from
> USER_CONSTRAINTS C
> where CONSTRAINT_TYPE = 'C'
> AND TABLE_NAME = 'BRKR'
>
>
> COUNT(CONSTRAINT_NAME)
> ----------------------
> 549
>
> AND TABLE_NAME = 'BRKR'
> /
>
> I'm still puzzled.

1 check constraints do *not* occur in user_cons_columns You need to use the search_condition column from user_constraints 2 Please download Toad from www.toadsoft.com run this query in a sql window, you will get a spreadsheet like output. Right click on the output window, export it to csv, and post it here. Alternatively start a schema browser, and export the table definition to a text file.

You query is correct, but I can't imagine why on earth you would have that many check constraints.

Hth,

Sybrand Bakker, Senior Oracle DBA Received on Tue Aug 21 2001 - 13:22:16 CDT

Original text of this message

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