David Greenberg <da*****@iba.org.il> wrote in message news:<3F**************@iba.org.il>...
Hi
I'm interested in using the timestamp data type & I have some questions.
As far as I can understand the contant of a timestamp column is a binary
value.
Is there any connection between that value and a valid date (as the word
timestamp means) or is it a left over from the days when the timestamp
value really was a datetime type (so it says in Books Online) ?
or is it just a unique identification of a row (a tuple id) ?
I tried converting a timestamp value to datetime and I got a date in 1900.
Thanks for any answer
David Greenberg
TIMESTAMP is a rather confusing name - in SQL2000 the synonym
ROWVERSION is preferred, which is a lot clearer. It's a unique value
which is changed every time the row is updated, so it can be used to
check if another user modified a row since you last queried it. If the
timestamp column has a different value than the one you saw, then the
row has been updated.
There's no connection with datetime data, but in the ANSI SQL
standard, TIMESTAMP is the equivalent of SQL Server's DATETIME, which
leads to some confusion.
Simon