|
Posted by Michael Austin on 02/13/06 19:43
Mladen Gogala wrote:
> On Mon, 13 Feb 2006 00:33:14 -0800, Florian Albrecht wrote:
>
>
>>Is there a way to fetch the properties unique and primary key?
>
>
> select col.owner,col.table_name,col.column_name,col.constraint_name
> from dba_constraints con,dba_cons_columns col
> where con.owner=col.owner and
> con.table_name=col.table_name and
> con.constraint_name=col.constraint_name and
> con.constraint_type in ('P','U') and
> con.table_name=:TABLE and
> con.owner=:OWNER
>
> You can user all_constraints and all_cons_columns instead the dba
> varieties, even LUSER_CONSTRAINTS and LUSER_CONS_COLUMNS.
>
>
--
Michael Austin.
Consultant - Available.
Donations welcomed. Http://www.firstdbasource.com/donations.html
:)
[Back to original message]
|