locked
rowversion datatype changed to timestamp in table's column RRS feed

  • Question

  • I was just checking about rowversion datatype on MSDN, link.

    I ran the 2 CREATE TABLE scripts mentioned there, one with timestamp and second with rowversion, scripts below:

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

    After the tables got created I checked in object explorer, the second column of both the table shows datatype as timestamp.

    How did the second table's ExampleTable2 column VerCol datatype changed from rownumber to timestamp?

     

    Also the rowversion datatype is not available in the column's datatype dropdown while creating a new table from SSMS.


    ~manoj | email: http://scr.im/m22g
    http://sqlwithmanoj.wordpress.com
    MCCA 2011
    Friday, December 23, 2011 12:05 PM

Answers

All replies

  • Hi,

    if you check http://msdn.microsoft.com/en-us/library/ms182776.aspx, you will find, that "timestamp is the synonym for the rowversion data type".

    The datatype is called "timestamp" inside the designer even if you should use rowversion inside the ddl.

    All datatype synonyms can be found at http://msdn.microsoft.com/en-us/library/ms177566.aspx.

    With kind regards,

    Konrad

    Friday, December 23, 2011 12:15 PM
  • The answer is sys.types. "rowversion" isn't there. "timestamp" is.

    Microsoft don't believe in their own deprecations.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
    Friday, December 23, 2011 12:59 PM
  • As of today (3 years later) this still hasn't been corrected or at least fully noted in the documentation. I've submitted a feedback suggestion to the SQLServer Connect portal (feedback item #1051602, the board isn't letting me post links yet).

    [connect.microsoft.com/SQLServer/feedback/details/1051602]

    Wednesday, December 10, 2014 8:28 PM