PL/SQL (MOSC)

MOSC Banner

before delete trigger

edited May 28, 2010 3:19AM in PL/SQL (MOSC) 5 commentsAnswered
 I have a table and the rows in the table sometimes gets deleted. I am planning to create an audit table and a before delete trigger. So whenever the rows in the original table gets deleted, it will insert a row to the audit table. This way the developer knows which row to delete in his copy table.

I have created the audit table using create table ticcrm.ttdsls921100_audit as select * from triton.ttdsls921100;

I have the following trigger:

create or replace trigger triton.before_delete_dsls921100

before delete on triton.ttdsls921100

for each row

declare

v_reflag := 'D'

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