DBA > Job Interview Questions > Oracle DBA Checklist

Oracle DBA Checklist - Weekly Procedures - No_pk

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

Oracle DBA Checklist - Weekly Procedures - No_pk.sql

-- no_pk.sql
--
-- To find tables without PK constraint


SELECT table_name
FROM all_tables
WHERE owner = '&OWNER'
MINUS
SELECT table_name
FROM all_constraints
WHERE owner = '&&OWNER'
AND constraint_type = 'P'

(Continued on next question...)

Other Job Interview Questions