Home » SQL & PL/SQL » SQL & PL/SQL » finding primary key (oracle 9i)
icon10.gif  finding primary key [message #312130] Tue, 08 April 2008 01:17 Go to next message
Messages: 1
Registered: April 2008
Junior Member
Hi all,

I am trying to see if there is a way I can find in my db all the primary keys for each of the various tables.

I've run the query:
select * from all_tables;

So now that I know what each of the various tables are in the db, I want to see if there is a standard query out there that will allow me to see what is the primary key is for each of these tables.
I'm not interested in the primary keys for the system tables but more the customer data tables.
In the all_tables view I can see numerous tables under the tablespace_name column with the description of tabledesc_data (i.e core_data or cdf_data), these are the tables I wish to find the primary keys for.

I much appreciate the help people....
Thank You inadvance
Re: finding primary key [message #312133 is a reply to message #312130] Tue, 08 April 2008 01:22 Go to previous messageGo to next message
Michel Cadot
Messages: 63912
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator


[Updated on: Tue, 08 April 2008 01:22]

Report message to a moderator

Re: finding primary key [message #312148 is a reply to message #312133] Tue, 08 April 2008 01:55 Go to previous message
Messages: 7062
Registered: December 2001
Senior Member
You might also want to check out all_cons_columns.

Previous Topic: Invoke Oracle Form from PLSQL
Next Topic: Sequence
Goto Forum:

Current Time: Sun Oct 23 22:32:57 CDT 2016

Total time taken to generate the page: 0.07164 seconds