I want to create a trigger that throws the error on dropping the table in the oracle live sql. In my code the trigger is created successfully but on trying to drop the table the different error i.e., Encountered the symbol "Drop" is shown
CREATE OR REPLACE TRIGGER drop_trigger BEFORE DROP ON SCHEMA BEGIN RAISE_APPLICATION_ERROR (-20000,'Cannot drop the table'); END; drop table emp;
Errors: TRIGGER DROP_TRIGGER Line/Col: 5/3 PLS-00103: Encountered the symbol "DROP"
Also tried to replace the line "BEFORE DROP ON SCHEMA" with "BEFORE DROP ON DATABASE"
and new error came i.e. "ORA-01031: insufficient privileges "
The code is performed on Oracle Live Sql