I want to execute a trigger and that should be applied to all users except one user.
How do I write this?
Please provide a simple code example?
I want to execute a trigger and that should be applied to all users except one user.
How do I write this?
Please provide a simple code example?
if user != 'BADGUY' then
-- run this code
end if;
CREATE OR REPLACE TRIGGER <trigger_name>
:
DECLARE
BEGIN
--replace scott with the user you want to restrict
IF sys_context( 'userenv', 'current_user' ) <> 'SCOTT' THEN
--do what you want to do
END IF;
END <trigger_name>;