SQL Server – Understanding the Timestamp Datatype

sql server

I need some information on SQL Server timestamp.

I found all the required information here.

The article says

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.

Sample syntax is to create timestamp column is

CREATE TABLE ExampleTable (PriKey int PRIMARY KEY, timestamp);

The new syntax is

CREATE TABLE ExampleTable2 (PriKey int PRIMARY KEY, VerCol rowversion) ;

So the question is, the word deprecated means Is Microsoft going to completely remove the timestamp datatype or it is removing just the syntax of using it ?

As I am using SQL Server 2014, in Design mode, I am still able to see timestamp datatype.

So can someone please clarify my doubt ?

And also is there any alternative datatype for timestamp, I want to use it for concurrency check ?

Best Answer

Only the timestamp syntax is deprecated, not the whole datatype. According to this, just use the rowversion syntax going forward.

For concurrency checks, rowversion is what you're looking for. The timestamp synonym still works, but is just an alternate name for rowversion. There are no other datatypes that behave similarly.