Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to find primary keys?
Tim Spellman wrote:
>
> I would like a list of all the primary key columns in all my tables.
> I'm
> thinking of something simple like
>
> select table_name, column_name from cols where <what is the condition?>;
SELECT CONSTRINT_NAME, TABLE_NAME FROM ALL_CONSTRAINTS WHERE CONSTRAINT_TYPE IN ('P','U') Received on Tue Apr 08 1997 - 00:00:00 CDT
![]() |
![]() |