oracle drop index if exists
Don’t check for existence. Try to drop, and capture the exception if necessary… DECLARE index_not_exists EXCEPTION; PRAGMA EXCEPTION_INIT (index_not_exists, -1418); BEGIN EXECUTE IMMEDIATE ‘drop index foo’; EXCEPTION WHEN index_not_exists THEN NULL; END; /