Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. CREATE TRIGGER INSERTEDAndDELETEDTableExample
  2. ON transcriptTable
  3. FOR UPDATE
  4. AS
  5. BEGIN
  6. --to get the old value (insert statement may vary depend on your need and table)
  7. insert into trancriptTable_log (column_1) SELECT <your_column_name> FROM DELETED
  8. --to get the new value
  9. insert into trancriptTable_log values (column_2) SELECT <your_column_name> FROM INSERTED
  10. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement