The "version" of the line should be updated every time the line changes - the unique identifier of the line is definitely not suitable for this! (this is usually set once and never changes).
What you are looking for is TIMESTAMP or ROWVERSION in SQL Server - it was called TIMESTAMP , but since it is really just an 8-byte binary βcounterβ and has nothing to do with time and / or date (except that it is monotonically increasing from over time), the SQL Server team will call it ROWVERSION from now on.
This is the data type that SQL Server internally updates β you cannot set or paste a value in such a field yourself. It is guaranteed to change every time a row changes, so you can use it to detect that something has changed in your data.
See MSDN docs in rowversion or read Understanding TIMESTAMP (ROWVERSION) in SQL Server about the ASP Alliance.
source share