Timestamp and datetime are different datatypes. Only datetime datatype
stores date and time. The timestamp value is just a unique binary value.
Timestamp is used for implementing custom locking solutions. That is, you
read a row, and remember it's timestamp value. Do whatever you want with
that row in your client application, and when you are writing the row back
to the database, you check to see if that row's timestamp is the same as
what you read before. If it is, you update the row, if it is different, then
you know that the row has been updated by someone else, and you need to
reconsile the changes. You can find more info on timestamp columns in SQL
Server Books Online.
Vyas, MVP (SQL Server)
What hardware is your SQL Server running on?
"Simon" <si> wrote in message
If I have a timestamp column in my product table, how can I select only
updated products from the last time?
Should I campare:
SELECT * FROM products WHERE Timestamp>oldTimeStamp
oldTimestamp I remember from the last SELECT from the last week for example.
Why use timestamp instead of datetime data type?