Home » SQL & PL/SQL » SQL & PL/SQL » List all constraints in a database
List all constraints in a database [message #233565] Thu, 26 April 2007 11:17 Go to next message
the9ulaire
Messages: 1
Registered: April 2007
Junior Member
How do I go about listing all of my constraints in my database one table at a time? I'm familiar with listing table names, column names, et cetera, but I cannot figure out how to do this.

Thanks!
Re: List all constraints in a database [message #233570 is a reply to message #233565] Thu, 26 April 2007 11:27 Go to previous messageGo to next message
srinivas.k2005
Messages: 342
Registered: August 2006
Senior Member
select * from user_cons_columns where table_name = 'EMP';

i think this will help
Re: List all constraints in a database [message #233587 is a reply to message #233570] Thu, 26 April 2007 13:47 Go to previous message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
BREAK ON owner ON table_name;

SELECT owner, table_name, constraint_name
FROM all_constraints
ORDER BY 1, 2, 3;
Previous Topic: Find multiple stings in a CLOB
Next Topic: Number of triggers in a table.
Goto Forum:
  


Current Time: Sun Dec 11 00:41:53 CST 2016

Total time taken to generate the page: 0.06873 seconds