|
Posted by Mladen Gogala on 02/13/06 16:01
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.
--
http://www.mgogala.com
Navigation:
[Reply to this message]
|