June 16, 2009 at 5:15 am
hi to all,
What is the basic difference b/n rowversion & timestamp.
when to use each over other.
please provide any help topics.
thanks,
🙂
June 16, 2009 at 7:07 am
This is taken from BOL:
" rowversion is the synonym for the timestamp data type and is subject to the behavior of data type synonyms. In DDL statements, use rowversion instead of timestamp wherever possible"
As you can see there is no difference between them.
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
June 17, 2009 at 4:15 am
Originally, the "Timestamp" datatype was defined as a counter of database row updates. Later, the ISO defined the "Timestamp" datatype as date and time information, causing a conflict between the SQL standard definition and the specific usage by MS SQL Server and Sybase.
From BOL
The timestamp syntax is deprecated. This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.
Rowversion can be used to prevent overlapping updates but requires the capturing of the rowversion column in selects, tracking of the rowversion by
the application, and including the tracked rowversion in the where clause of all update and delete statements.
In conclusion, use the rowversion datatype only when overlapping update logic will be included in the application architecture.
Rowversion cannot be used to determine the data and time when the row was last updated.
SQL = Scarcely Qualifies as a Language
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply