RowID in Sql Server

  • Hi,

    Is anybody know that do we have anything like Oracle's inbuilt primary key ROWID which is also accessible to database developer.

    I searched for it but could not get the satisfactory answer.

    Thanks,

    🙂

  • ajaymistry_07 (8/8/2008)


    Hi,

    Is anybody know that do we have anything like Oracle's inbuilt primary key ROWID which is also accessible to database developer.

    I searched for it but could not get the satisfactory answer.

    Thanks,

    🙂

    There isn't one that you can access from T-SQL. You should set up a PK yourself. If you run into a situation where there isn't one on a table, you may still be able to access individual items on SQL Server 2005 and 2008 (just search the forums for removing duplicate rows)

    Regards,

    Andras


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • ... like Oracle's inbuilt primary key ROWID

    Oracle's ROWID is not a PK. ROWID is a unique row identifier, nothing else, nothing more.

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • ROWIDs represent the physical location of a record/row.

    And most important part is ROWID can change if the row is moved as in index organized or partitioned tables.

  • If you are using SQL Server 2005 or 2008 you can take advantage of the Row_number function. If you are in 2000, you can use an identity column

Viewing 5 posts - 1 through 4 (of 4 total)

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