Use
select * from user_constraints where table_name=upper('tablenam
Main Topics
Browse All TopicsI have an existing database that was created by someone else. I want to view the check constraint properties of a couple of columns. How can I do this via command?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
if you have a referential constraint, meaning a particular column in a table
is referring to a primay key column in some other table. For example, EMP table
has a column deptno with a referential constraint referring to deptno column in
DEPT table which is a primary key.
select *
from dba_constraints
where owner ='SCOTT'
and table_name ='EMP'; --> take the r_constraint_name column value from the
--> output of this query and put it in the below query
--> to see to which table column it is referring to.
select *
from dba_constraints
where owner ='SCOTT'
and constraint_name ='FK_DEPT_CONS' ; --> you can find all other details except
--> column name of the the referential constraint.
select *
from dba_cons_columns
where constraint_name = 'PK_LOPV' ; --> you can find the column name
--> of the referential constraint
Also the constraint type will be 'R' for foreign key constraints, 'P' for
primary key constraint, 'C' for check constraints.
Business Accounts
Answer for Membership
by: sujith80Posted on 2008-11-14 at 08:08:20ID: 22960799
You can make use of the views
dba_constraints
dba_cons_columns
If you dont have privileges you may use all_constraints and all_cons_columns
The query will look like
select *
from dba_cons_columns
where table_name = upper('<your table name>') and column_name = upper('<your column name>')