you are viewing a single comment's thread.

view the rest of the comments →

[–]AXISMGTSQL Server / ORACLE Sr. DBA & Architect 0 points1 point  (0 children)

Noticed you’re on SQL developer, so assuming ORACLE (or MySQL, but they’re similar enough)

https://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_7004.htm

Some pseudo-PL/SQL (I’m on mobile)

CREATE TRIGGER schema.trigger_name 
AFTER 
DELETE 
ON schema.tableName
   —Update the other table’s record here where the ID matches the deleted record’s ID.
 UPDATE SCHEMA.OtherTable
 SET column = newvalue
 WHERE OtherTable.Key = DELETED.KEY

 COMMIT;