This illustration shows two replication sites: site A and site B. The following update is made at site A:

UPDATE employees SET department_id = 20   WHERE last_name='Jones';

The illustration shows the employees table with the department_id updated to 20 for the employee with the last name Jones.

At site A, an internal trigger fires when this update is made. The code for the internal trigger is similar to the following:

if updating
      update@dba1(oldargs newargs)
      update@dba2(oldargs newargs)   
 
if inserting
      insert@dba1(newargs)
      insert@dba2(newargs)
      
if deleting
      delete@dba1(oldargs)
      delete@dba2(oldargs)

The internal trigger at site A invokes a package at site B, and the package updates the employees table at site B to set the department_id to 20 for the employee with the last name Jones.

The code in the package is similar to the following:

update(oldargs newargs)
      UPDATE employees ...  
 
insert(newargs)
      INSERT INTO employees ...
      
delete(oldargs)
      DELETE FROM employees ...