Print
Add To Favorites
Email To Friend
Rate This Article
|
Understanding TIMESTAMP (ROWVERSION) in SQL Server
|
Published:
15 Dec 2008
|
Abstract
TIMESTAMP is one of the more useful T-SQL statements in SQL Server. In this article, Abhishek describes the usage of TIMESTAMP, called ROWVERSION in SQL Server, with the help of relevant T-SQL queries and corresponding output along with a detailed description. He also focuses on whether it is related to DATETIME in SQL. He examines the usage of TIMESTAMP using CREATE TABLE, INSERT, and UPDATE commands and also outlines the benefit of it in multi-user table access. He wraps up the article by providing the differences between TIMESTAMP and UNIQUEIDENTIFIER. |
 |
by Abhishek Kumar Singh
Feedback
|
Average Rating:  
Views (Total / Last 10 Days):
14558/
390
|
|
|
|
| Introduction |
I have included TIMESTAMP in this article as it first seems as
if TIMESTAMP is something related to SMALLDATETIME or DATETIME. To be frank, I
was also thinking as if I were a beginner in SQL Server. But in fact, TIMESTAMP
value does not contain any date or time related value. It is not dependent on
system date. In fact, it contains binary format string to denote a version of a
row in table. That is why it is also called ROWVERSION. Also, ROWVERSION is the
keyword in SQL Server which has the same behavior as TIMESTAMP.
|
|
|
|
|
Article Feedback
User Comments
Title:
timestamp problem
Name:
arpizt
Date:
10/29/2009 9:35:55 PM
Comment:
"UPDATE table SET field = current_timestamp where (field=1)" Error msg this field cannot been update.
Thanks.
|
Title:
arpizt@gmail.com
Name:
abhishek
Date:
10/28/2009 6:41:21 PM
Comment:
arpizt@gmail.com can you post your query here?
|
Title:
timestamp problem
Name:
arpizt@gmail.com
Date:
10/27/2009 5:53:58 AM
Comment:
Hi,
I try to run the insert sql, but got this error ("Column or expression 'PaymentDate' cannot be updated." Why? How to overcome this problem?
|
Title:
Abhishek Your Time Stamp Aarticle too good
Name:
Gbbs Mith
Date:
6/13/2009 5:02:18 AM
Comment:
The article is very good because it was justified clearly time and datetime data type. Hope more such article
Thanks
|
Title:
Beginner
Name:
nagarajan
Date:
3/17/2009 9:47:06 AM
Comment:
excellent artice about TIMESTAMP.
|
Title:
job
Name:
eak
Date:
1/8/2009 2:17:28 AM
Comment:
http://www.sqlhacks.com/index.php/Dates/Timestamp
|
Title:
good
Name:
Jen
Date:
12/18/2008 4:57:37 AM
Comment:
good for quick walkthrough.
|
|
|
|
|
|