SELECT OWNER, TABLE_NAME
FROM dba_tables t1
WHERE NOT EXISTS(
SELECT 'TRUE'
FROM dba_constraints t2
WHERE t1.TABLE_NAME = t2.TABLE_NAME
AND t2.CONSTRAINT_TYPE='P')
AND OWNER NOT IN ('SYS','SYSTEM')
ORDER BY OWNER, TABLE_NAME
Thursday, January 21, 2010
Get tables without primary key
at 6:41 AM
Labels: Oracle, Oracle Query, PL/SQL
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment