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: How to get a list of constraints on a table?

Re: How to get a list of constraints on a table?

From: Luis Cabral <cabral_at_merconet.com.br>
Date: 1997/12/19
Message-ID: <01bd0c4d$163614a0$LocalHost@lcdc>#1/1

Hi Grace,

Try:

select search_condition
from user_constraints
where table_name = 'TABLE_NAME' /*name of the table in uppercase*/ and constraint_type = 'C';

Through the same view you can get information about PKs and FKs.

Um abraço e lembranças do Brasil

-- 
Luis Cabral
cabral_at_merconet.com.br



Grace Tsai <gtsai_at_ribm00.rhic.bnl.gov> escreveu no artigo
<34982EA4.41C6_at_ribm00.rhic.bnl.gov>...

> One of my users asked me
>
> "What the sql is to get a list of all the constraints on a table
> i.e.(CONSTRAINT check_hum(humidity between 0 and 100)?"
>
> Any help would be greatly appreciated. Thanks in advance.
>
> Regards,
> Grace Tsai
> Brookhaven National Lab
>
Received on Fri Dec 19 1997 - 00:00:00 CST

Original text of this message

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