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 -> selecting constraints from dictionary

selecting constraints from dictionary

From: Chuck Hamilton <chuckh_at_dvol.com>
Date: 1998/01/05
Message-ID: <34b10241.11061254@news.dvol.com>#1/1

Is there a way to select all of the constraints on a table except the not null ones? The problem I'm encountering is that if I try to say

SELECT * FROM USER_CONSTRAINTS WHERE TABLE_NAME = 'MYTABLE' AND SEARCH_CONDITION NOT LIKE '%IS NOT NULL' I get an error stating basically that SEARCH_CONDITION is a LONG datatype.

If I try to join USER_CONSTRAINTS, USER_CONS_COLUMNS, and USER_TAB_COLUMNS to see if USER_TAB_COLUMNS.NULLABLE <> 'N', then it excludes ALL constraints on the not null columns, not just the NOT NULL constraints (i.e. there could be a not null constraint *and* a check constraint on a column).

--
Chuck Hamilton
chuckh_at_dvol.com

"Therefore the Lord Himself will give you a sign:
Behold, a virgin will be with child, and bear a son,
and she will call His name Immanuel." (Isa 7:14 NASB)
Received on Mon Jan 05 1998 - 00:00:00 CST

Original text of this message

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