@@DBTS (SQL Server Compact)

@@DBTS returns the value of the current rowversion (timestamp) data type for the database. The rowversion is guaranteed to be unique in the database. @@DBTS returns a varbinary which is the last-used rowversion value of the current database. A new rowversion value is generated when a row with a rowversion column is inserted or updated.

Any INSERT, UPDATE and CREATE queries will internally increment the rowversion values.


Select @@DBTS

@@DBTS value is not rolled back when a transaction rolls back or when an INSERT or UPDATE query causes an error.