SQL update trigger is not always an update

So, I have a simple update trigger that copies deleted data to another table of the same format with the addition of a modified date. It works fine, however, in the application code there are many cases when an update is performed that does not actually change any values.

I try to avoid getting into audit tables.

Does anyone have any suggestions on how I can fix this without changing the application code. Perhaps a simple string comparison to check for changes?

thank

+3
source share
2 answers

Unfortunately, this is a column comparing columns in a trigger

: 100% CHECKSUM (*). HashBytes

+2

- , . FOR XML, HashBytes() .

. . HashBytes() XML, HashBytes(). , , , .

.

0

Source: https://habr.com/ru/post/1776864/


All Articles