Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
T-SQL (SS2K5)
»
How to get rowid in sql server 2005
41 posts, Page 1 of 5
1
2
3
4
5
»
»»
How to get rowid in sql server 2005
Rate Topic
Display Mode
Topic Options
Author
Message
nitinkumar_tss
nitinkumar_tss
Posted Friday, March 26, 2010 11:59 AM
Forum Newbie
Group: General Forum Members
Last Login: Sunday, January 29, 2012 11:19 AM
Points: 9,
Visits: 21
I want to get the rowid internally generated at table level in sql server. Because I need to perform some task according to the rowid.
Post #890948
Dan.Humphries
Dan.Humphries
Posted Friday, March 26, 2010 12:22 PM
SSC Eights!
Group: General Forum Members
Last Login: Thursday, November 15, 2012 8:38 AM
Points: 802,
Visits: 1,169
do you want to return a result with a row number as part of the output or do you want to grab a specific row, as in you want row 10 of the data set?
Dan
If only I could snap my figures and have all the correct indexes apear and the buffer clean and.... Start day dream here.
Post #890975
Lynn Pettis
Lynn Pettis
Posted Friday, March 26, 2010 12:24 PM
SSC-Insane
Group: General Forum Members
Last Login: Today @ 3:18 AM
Points: 21,588,
Visits: 27,375
nitinkumar_tss (3/26/2010)
I want to get the rowid internally generated at table level in sql server. Because I need to perform some task according to the rowid.
Unfortunately, there isn't an internally generated rowid at the table level in SQL Server.
Lynn Pettis
For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here
or
when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here
and
here
Managing Transaction Logs
SQL Musings from the Desert
Fountain Valley SQL
(My Mirror Blog)
Post #890977
Garadin
Garadin
Posted Friday, March 26, 2010 1:52 PM
SSCommitted
Group: General Forum Members
Last Login: Wednesday, November 07, 2012 4:08 PM
Points: 1,525,
Visits: 4,047
It seems like Oracle uses something like this that you can access, but unfortunately MS SQL does not. If you can give more details on your goal, it's possible we can suggest another way to do it.
Seth Phelabaum
Consistency is only a virtue if you're not a screwup.
Links
:
How to Post Sample Data
::
Running Totals
::
Tally Table
::
Cross Tabs/Pivots
::
String Concatenation
Post #891059
vijay.s
vijay.s
Posted Saturday, March 27, 2010 8:25 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Today @ 4:04 AM
Points: 127,
Visits: 307
what kind of row id du you need.
If you need row id which is stored in your table then you can use table's identity value for the same
Post #891293
vidya_pande
vidya_pande
Posted Saturday, March 27, 2010 1:14 PM
SSC Eights!
Group: General Forum Members
Last Login: Monday, June 04, 2012 5:00 PM
Points: 891,
Visits: 225
there is not rowid equivalent in SQL Server
Post #891332
Paul White
Paul White
Posted Sunday, March 28, 2010 2:00 AM
SSChampion
Group: General Forum Members
Last Login: Wednesday, May 08, 2013 10:33 AM
Points: 10,989,
Visits: 10,529
Lynn Pettis (3/26/2010)
nitinkumar_tss (3/26/2010)
I want to get the rowid internally generated at table level in sql server. Because I need to perform some task according to the rowid.
Unfortunately, there isn't an internally generated rowid at the table level in SQL Server.
Well, technically there is, sort of, but it is undocumented and not intended for use by end users.
Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #891408
SwePeso
SwePeso
Posted Sunday, March 28, 2010 6:22 AM
SSCrazy
Group: General Forum Members
Last Login: Monday, May 06, 2013 1:26 PM
Points: 2,359,
Visits: 3,292
Paul White NZ (3/28/2010)
[quote]Well, technically there is, sort of, but it is undocumented and not intended for use by end users.
+1 for that.
All records do have a "hidden" record identifier, when there is not primary key on the table. That's the way SQL Server distinguishes between two identical records.
Read more about what Kalen Delaney writes about this.
N 56°04'39.16"
E 12°55'05.25"
Post #891448
Lynn Pettis
Lynn Pettis
Posted Sunday, March 28, 2010 8:47 AM
SSC-Insane
Group: General Forum Members
Last Login: Today @ 3:18 AM
Points: 21,588,
Visits: 27,375
SwePeso (3/28/2010)
Paul White NZ (3/28/2010)
[quote]Well, technically there is, sort of, but it is undocumented and not intended for use by end users.
+1 for that.
All records do have a "hidden" record identifier, when there is not primary key on the table. That's the way SQL Server distinguishes between two identical records.
Read more about what Kalen Delaney writes about this.
Is it actually a row identifier, like this is row 10? Reason I ask is that is what most people are looking for when they are asking about an internal rowid. Is that what this individual is asking, not sure.
Lynn Pettis
For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here
or
when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here
and
here
Managing Transaction Logs
SQL Musings from the Desert
Fountain Valley SQL
(My Mirror Blog)
Post #891471
GilaMonster
GilaMonster
Posted Sunday, March 28, 2010 9:53 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 2:48 AM
Points: 37,635,
Visits: 29,886
Lynn Pettis (3/28/2010)
Is it actually a row identifier, like this is row 10? Reason I ask is that is what most people are looking for when they are asking about an internal rowid. Is that what this individual is asking, not sure.
Think they're talking about the RID. Row Identifier, binary value, 8-byte combination of file id, page number and slot index. It's accessible on all tables (not just heaps), however it's likely to change whenever the clustered index is rebuilt (and, on SQL 2008, if the heap is ever rebuilt) because it's the physical location of the row.
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass
Post #891481
« Prev Topic
|
Next Topic »
41 posts, Page 1 of 5
1
2
3
4
5
»
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.