Guest User

Untitled

a guest
Jul 16th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. create trigger calc_code_t_update_row
  2. after UPDATE
  3. on calc_code
  4. for each row
  5. BEGIN
  6. IF NEW.code != OLD.code
  7. THEN INSERT INTO calc_code_backup
  8. (calc_id, user_id, code, local_code, calc_width, status)
  9. VALUES
  10. (OLD.calc_id, OLD.user_id, OLD.code, OLD.local_code, OLD.calc_width, OLD.status);
  11. END IF;
  12. END;
Add Comment
Please, Sign In to add comment