Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to get a list of constraints on a table?
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>...Received on Fri Dec 19 1997 - 00:00:00 CST
> 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
>