Equivalent of Oracle's RowID in SQL Server

前端 未结 13 1202
长发绾君心
长发绾君心 2020-11-27 04:22

What\'s the equivalent of Oracle\'s RowID in SQL Server?

相关标签:
13条回答
  • 2020-11-27 05:23

    Please see http://msdn.microsoft.com/en-us/library/aa260631(v=SQL.80).aspx In SQL server a timestamp is not the same as a DateTime column. This is used to uniquely identify a row in a database, not just a table but the entire database. This can be used for optimistic concurrency. for example UPDATE [Job] SET [Name]=@Name, [XCustomData]=@XCustomData WHERE ([ModifiedTimeStamp]=@Original_ModifiedTimeStamp AND [GUID]=@Original_GUID

    the ModifiedTimeStamp ensures that you are updating the original data and will fail if another update has occurred to the row.

    0 讨论(0)
提交回复
热议问题