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: in which sys-view are unique-constraints

Re: in which sys-view are unique-constraints

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Tue, 01 Mar 2005 08:40:06 -0800
Message-ID: <1109695019.729619@yasure>


GreyBeard wrote:

> On Tue, 01 Mar 2005 00:18:12 +0100, Lore Leuneog wrote:
>
>

>>Hello
>>
>>Does anyone know in which sys view I can find which columns have unique
>>constraints?
>>Because all_constraints has only constraint_type which is P (for primary
>>key) and C (for nonnull?) and R (for?) but nothing for "unique".
>>

>
>
> Check again.
>
> From the "Oracle9i Database Reference / Release 2 (9.2)" manual, found at
> http://docs.oracle.com (Part Number A96536-02), Chapter 2 "Static Data
> Dictionary Views", section "ALL_CONSTRAINTS", for column "CONSTRAINT_TYPE"
>
> "
> CONSTRAINT_TYPE VARCHAR2(1) Type of constraint definition:
>
> * C (check constraint on a table)
> * P (primary key)
> * U (unique key)
> * R (referential integrity)
> * V (with check option, on a view)
> * O (with read only, on a view)
> "
>
> FGB
And lets not forget the new 10g constraint type "?" present on AQ$_REPLAY_INFO and WRI$_ADV_DEFINITIONS. The search condition as follows but they are not traditional check constraints.

"AGENT" IS NOT NULL
"TYPE" IS NOT NULL They are check constraints on composite data types.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Tue Mar 01 2005 - 10:40:06 CST

Original text of this message

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