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 -> Re: How to find constraints of a table using SQL

Re: How to find constraints of a table using SQL

From: Brian Peasland <peasland_at_usgs.gov>
Date: Sat, 24 Feb 2001 16:39:56 GMT
Message-ID: <3A97E3DC.779D095C@usgs.gov>

You will need two data dictionary views, USER_CONSTRAINTS and USER_CONS_COLUMNS. This first one will tell you all the constraints you have on all of your columns. Since constraints tend to apply to specific columns of a table, the USER_CONS_COLUMNS will help too!

HTH,
Brian

"Zhou, Xiaodong" wrote:
>
> Hi, there:
>
> I want to see the constraints(foreign key, primary key, etc.) of a table. I
> don't know how to do it in SQL. Will you please give me some advice?
> Thanks in advance!
>
> Yours xdzhou
 

-- 
========================================
Brian Peasland
Raytheons Systems at
  USGS EROS Data Center
These opinions are my own and do not
necessarily reflect the opinions of my 
company!
========================================
Received on Sat Feb 24 2001 - 10:39:56 CST

Original text of this message

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