Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Find all tables without a primary key in a schema

flying_penguinMar 30 2017 — edited Mar 30 2017

DB version : 11.2.0.4

How can I find all tables without a primary key ? The following query will tables which have primary keys too

select * from user_constraints p WHERE (p.constraint_type != 'P' OR p.constraint_type != 'U')

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 27 2017
Added on Mar 30 2017
5 comments
820 views