By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,743 Members | 1,018 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,743 IT Pros & Developers. It's quick & easy.

The TIMESTAMP data type

P: n/a
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

Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.