PL/SQL (MOSC)

MOSC Banner

Raise exception in Trigger after update

edited Jun 19, 2009 8:38AM in PL/SQL (MOSC) 6 commentsAnswered
 This does not seem to work. I want to raise an exception after the update or insert on table. Update does not occur.

create or replace sometrigger

after update or insert on table_name

for each row

declare

begin

   check_table_condition(:new.column_name);

--if proc throws exception

exception

  when others then

   RAISE_APPLICATION_ERROR(-20500, 'some message', TRUE);

end sometrigger;

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center