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

Home -> Community -> Usenet -> c.d.o.server -> A join question

A join question

From: Stan Brown <stanb_at_panix.com>
Date: 17 Aug 2001 15:12:11 -0400
Message-ID: <9ljqab$n4g$1@panix3.panix.com>


I am trying to obtain the "check" constraints on a given table using an SQL statement. So far I have this:

select
C.table_name,
CC.COLUMN_NAME ,
SEARCH_CONDITION
from
USER_CONSTRAINTS C ,
USER_CONS_COLUMNS CC
where CONSTRAINT_TYPE = 'C'

AND CC.TABLE_NAME = 'BRKR'
AND CC.TABLE_NAME =  C.TABLE_NAME
AND CC.CONSTRAINT_NAME = C.CONSTRAINT_NAME
ORDER BY CC.TABLE_NAME Which seems to return what I need BUT for a table that shold only have 2 or 3 of these it returns 500+ rows (and takes a long time).

I suspect that I am dooing the join incoreclty. Any guidance oon this? Received on Fri Aug 17 2001 - 14:12:11 CDT

Original text of this message

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