简体   繁体   中英

How to create a trigger that will only update a record if old record is different from new in SQL

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

Create Trigger Customer_Update ON Customer UPDATE AS

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM