I want to apply data concurrency on some of tables in my SQL Server database. In order to achieve row versioning, I am thinking of adding an integer
column named RowVersion
, and increase the row value of the column when I update a row.
There is an other option: using timestamp
column. When you use timestamp
column, SQL Server automatically creates a unique value when the row was updated.
I want to know the advantages of these options. I think that inserting an int
column to store row version is more generic way while inserting a timestamp
column is SQL Server specific.
What is more, integer
value of a row version is more human readable than timestamp
column.
I want to know other advantages or disadvantages choosing integer
column for row version field.
Thanks.