Friday, March 5, 2010

Get tables without indexes

SELECT OWNER, TABLE_NAME
FROM (SELECT OWNER, TABLE_NAME
FROM dba_tables
WHERE OWNER NOT IN ('SYS','SYSTEM')
MINUS
SELECT TABLE_OWNER, TABLE_NAME
FROM dba_indexes
WHERE OWNER NOT IN ('SYS','SYSTEM'))
ORDER BY OWNER,TABLE_NAME;

No comments:

Post a Comment