ora_rowscn equivalent

  • Hi,

    Is there any timestamps or values created by sql server for each rows (in incremental way).

    like the ORACLE have the ora_rowscn. please help for this.

    Thanks,

    basee

  • There are several ways to do this in SQL Server:

    * you can addan identity column (which has one of the numeric) data types. This column auto-increments.

    * in SQL Server 2012, you can create a sequence object which serves about the same goals as the identity, but is more managed

    * you could add a column with data type uniqueidentifier and put a default of newid() on it (or newsequentialid())

    * you could add a rowversion column

    * you could add a datetime or datetime2 column and assign the default of getdate() to new rows. This isn't garantueed to be unique though.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply