August 8, 2008 at 2:50 am
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,
August 8, 2008 at 2:57 am
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
August 8, 2008 at 9:41 am
... 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.August 11, 2008 at 10:21 pm
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.
August 18, 2008 at 8:06 am
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
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy