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: Some way to list all constraints?

Re: Some way to list all constraints?

From: Joel Garry <joel-garry_at_home.com>
Date: 20 Feb 2004 14:37:33 -0800
Message-ID: <91884734.0402201437.3da15cd8@posting.google.com>


GoogleGroups_at_FatBelly.com (PeteCresswell) wrote in message news:<74d79443.0402200718.5b9ef01_at_posting.google.com>...
> > Check the ALL_CONSTRAINTS table.
>
> Got it. Thanks.
>
> Funny thing though...via SQL Programmer this SQL
> returns CONSTRAINT_NAME values, but nothing in the
> SEARCH_CONDITION column.
> ----------------------------------------------
> SELECT
> ac.CONSTRAINT_NAME,
> ac.SEARCH_CONDITION
>
> FROM
> ALL_CONSTRAINTS ac
>
> WHERE
> ac.OWNER='FIMACON'
>
> ORDER BY
> ac.CONSTRAINT_NAME;
> -----------------------------------------------
>
> OTOH, if I go at it via ODBC from an MS Access DB
> using this SQL, I see SEARCH_CONDITION in at least
> some (but not all) rows:
> -----------------------------------------------
> SELECT
> PUBLIC_ALL_CONSTRAINTS.CONSTRAINT_NAME,
> PUBLIC_ALL_CONSTRAINTS.SEARCH_CONDITION
>
> FROM
> PUBLIC_ALL_CONSTRAINTS
>
> WHERE
> (((PUBLIC_ALL_CONSTRAINTS.OWNER)="FIMACON"))
>
> ORDER BY
> PUBLIC_ALL_CONSTRAINTS.CONSTRAINT_NAME;
> -----------------------------------------------

Do a desc all_constraints in sqlplus. You might get a bad feeling about how ODBC and sql programmer handle LONG variable types from your above experiment.

jg

--
@home.com is bogus.
http://www.asktheheadhunter.com/newsletter/OE20030617.htm
Received on Fri Feb 20 2004 - 16:37:33 CST

Original text of this message

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