Database Utilities (MOSC)

MOSC Banner

Getting Constraint Information in Data Dictionary

edited Mar 14, 2013 7:23AM in Database Utilities (MOSC) 5 commentsAnswered
select   ac.owner         ,ac.CONSTRAINT_NAME
        ,ac.CONSTRAINT_TYPE
        ,ac.TABLE_NAME
        ,acc.column_name
        ,acc.position

  from  all_constraints  ac
       ,all_cons_columns acc
 where ac.owner IN ('CPSADMIN','ISYNC')
   and constraint_type <> 'C'
   and ac.constraint_name = acc.constraint_name
   and ac.table_name = acc.table_name
order by constraint_type ,constraint_name , position;

I am using this query to get constraint information but cannot find a way to display the PK source for my FKs.

What am I missing?

thanks
Alan

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center