Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

RowID in Sql Server Expand / Collapse
Author
Message
Posted Friday, August 8, 2008 2:50 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, November 21, 2013 12:42 AM
Points: 152, Visits: 198
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,
:)
Post #548943
Posted Friday, August 8, 2008 2:57 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, January 26, 2012 5:26 AM
Points: 1,367, Visits: 1,585
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
Post #548947
Posted Friday, August 8, 2008 9:41 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, January 28, 2014 8:15 AM
Points: 3,065, Visits: 4,639
... 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.
Post #549341
Posted Monday, August 11, 2008 10:21 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, November 27, 2008 12:41 AM
Points: 11, Visits: 27
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.
Post #550736
Posted Monday, August 18, 2008 8:06 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Saturday, December 10, 2011 6:38 AM
Points: 215, Visits: 633
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
Post #554339
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse