Home » SQL & PL/SQL » SQL & PL/SQL » SQL Query to get all constraints of database (Oracle 10g)
SQL Query to get all constraints of database [message #401392] Mon, 04 May 2009 08:39 Go to next message
arvindgangwar
Messages: 2
Registered: May 2009
Location: Mumbai
Junior Member
hi,
I am using Oracle 10g. I want to retrive the list of all constraints of database. So please tell me the sql query for this.

Thanks & Regards
Arvind Gangwar
Re: SQL Query to get all constraints of database [message #401393 is a reply to message #401392] Mon, 04 May 2009 08:42 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10672
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Look into All_Constraints/Dba_Constraints.
Re: SQL Query to get all constraints of database [message #401464 is a reply to message #401392] Tue, 05 May 2009 02:06 Go to previous messageGo to next message
madhavi babburi
Messages: 117
Registered: May 2009
Location: Hyderabad
Senior Member
Hi,

SELECT CONSTRAINT_NAME, CONSTRAINT_TYPE FROM USER_CONSTRINTS;

I think this query is useful.
Re: SQL Query to get all constraints of database [message #401473 is a reply to message #401464] Tue, 05 May 2009 02:41 Go to previous messageGo to next message
Michel Cadot
Messages: 64140
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
madhavi babburi wrote on Tue, 05 May 2009 09:06
Hi,

SELECT CONSTRAINT_NAME, CONSTRAINT_TYPE FROM USER_CONSTRINTS;

I think this query is useful.

I think it is not.
SQL> SELECT CONSTRAINT_NAME, CONSTRAINT_TYPE FROM USER_CONSTRINTS;
SELECT CONSTRAINT_NAME, CONSTRAINT_TYPE FROM USER_CONSTRINTS
                                             *
ERROR at line 1:
ORA-00942: table or view does not exist


In addition, this does not add anything to the previous post, is in violation of the OraFAQ Forum Guide which stated to post hint or point to the right direction (please read it), and is disrespect for Mahesh Rajendran's post.

Regards
Michel
Re: SQL Query to get all constraints of database [message #401549 is a reply to message #401464] Tue, 05 May 2009 08:27 Go to previous message
arvindgangwar
Messages: 2
Registered: May 2009
Location: Mumbai
Junior Member
Thank a lot
Previous Topic: SQL: need to get data in a different way (merged)
Next Topic: condition based on datetime
Goto Forum:
  


Current Time: Fri Dec 09 04:26:03 CST 2016

Total time taken to generate the page: 0.10423 seconds