Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Trigger ON DELETE or DROP or TRUNCATE

528084May 20 2007 — edited May 20 2007
create trigger DDL_GUARD_cact
before DROP or TRUNCATE or DELETE
on cidcb_cac
begin
raise_application_error( -20001, 'You are not allowed to DROP or TRUNCATE table in this schema. ' );
end;

I am try to build a triger so that no one can delete truncate or delete my table in schema but it is showing me error when i m executing it...

ORA-30506: system triggers cannot be based on tables or views

i think i am wrong in writing this query ...can someone guied me in creating this kind of trigger ...i am a user in oracle not administrator......

so how can show error if someone try to do with my table in my schema like HR

thanks in advance....:)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 17 2007
Added on May 20 2007
5 comments
3,054 views