Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

select pk and fk from user_tables

Status
Not open for further replies.

rubychyld

Programmer
Mar 22, 2001
76
US
I would like to know the correct syntax for something like this...

select * from user_constraints where table_name = 'employee';

I am new to this, and am having trouble seeing my primary keys, foreign keys, and user check constraints after they are created. (I'm using SQLPlus - oracle 8i)

thanks so much for sharing...
Liz
 
You need to specify the table name in upper case:

select * from user_constraints where table_name = 'EMPLOYEE';

Your primary key will have a constraint_type code of 'P' while foreign keys will have a code of 'R'.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top