-2

Any table example would be appreciated how I would try going about comparing

Create Trigger Customer_Update ON Customer UPDATE AS

Thorsten Kettner
  • 89,309
  • 7
  • 49
  • 73
  • "will only update a record if old record is different from new" - How will you see the difference? If the update happens, the row will look as before. If the update doesn't happen, the row will also look like before. – Thorsten Kettner Oct 24 '21 at 23:10
  • 1
    You've tagged two different DBMS (MySQL and SQL Server). I've remove these tags. Please tag only the DBMS you are using. – Thorsten Kettner Oct 24 '21 at 23:10
  • You reference `inserted` and `deleted`. Join the tables and compare as necessary. – shawnt00 Oct 24 '21 at 23:15

1 Answers1

0

You can use 'inserted' and 'deleted' tables in SQL Server. Remember to cater for nultiple rows being updated. This question should help you out.

MikeAinOz
  • 126
  • 1
  • 10
  • 24