Trigger - continued

xiaoxiao2021-03-06  48

Some netizens asked the front-written trigger chapter when the table guards, if the DBA user needs to delete the table, so

Modify the trigger

CREATE OR REPLACE TRIGGER trg_dropdenybefore drop on databasebegin if (sys.login_user = 'SYS'!) - only allows the user SYS DROP table then raise_application_error (num => - 20000, msg => 'You can not delete table' || ora_dict_obj_name ( ) || '!'); Endiff;

转载请注明原文地址:https://www.9cbs.com/read-40829.html

New Post(0)