Home » SQL & PL/SQL » SQL & PL/SQL » How to find tables with nullable Unique Keys (Oracle 11.2.0.4)
How to find tables with nullable Unique Keys [message #630971] Wed, 07 January 2015 04:25 Go to next message
testoli
Messages: 1
Registered: January 2015
Location: Germany
Junior Member
Hi,

I am facing an issue with tables that do have a unique key which is nullable.
Now I need to find all tables in a schema which has UI with nullable = Y.

Any script available?

Thanks a million....

Oliver
Re: How to find tables with nullable Unique Keys [message #630973 is a reply to message #630971] Wed, 07 January 2015 04:47 Go to previous message
Michel Cadot
Messages: 68647
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

dba_constraints gives you the unique constraints
dba_cons_columns gives you the columns of these constraints
dba_tab_columns.nullable gives you if the column is nullable or not in its definition
dba_cons_columns join to dba_constraints give you if the column is part of a check constraint then you have to test if the check constraint is like "column IS NOT NULL".

Previous Topic: SYS_CONTEXT('USERENV','TERMINAL') gives "unknown" result in SQL Developer tool[split]
Next Topic: creation of view by passing the values dynamically
Goto Forum:
  


Current Time: Fri Apr 26 15:07:30 CDT 2024