How to update a record without changing rowversion

If there is a rowversion column in the table and you are doing an update for that row, the value of the rowversion column is incremented. I know that this is in the design and purpose of rowversion columns, however is there a way to make the update operation not affect the value of rowversion?

Edit: update tracking is required for all columns, however there are some operations that we would like to avoid perceiving as new versions.

+6
sql-server tsql
source share
2 answers

Not. See MSDN . "Each time a row with a rowversion column is changed or inserted, the rowversion value with the added database is inserted into the rowversion column."

+3
source share

No, but maybe you want to use auto-increment ? Then you create a new unique number when you create a line, but does not change when you change the line.

If you also need some kind of change counter that is not applicable to all columns, you could implement this yourself in another column.

+3
source share

All Articles