Re: id record for each table
From: Steve Kass (skass_at_drew.edu)
Date: 07/15/04
- Next message: Paul Connelly: "Re: bug or unknown feature in tsql/somewhere?"
- Previous message: rooster575: "Re: 3 SQL queries in 1 string...in what order will they execute?"
- In reply to: Enric: "id record for each table"
- Next in thread: Bradley M. Small: "Re: id record for each table"
- Reply: Bradley M. Small: "Re: id record for each table"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 14 Jul 2004 22:05:40 -0400
No [rowid]-like column is exposed to users. If you have a natural order
based on column values of the table, you can use it to find the row with
particular rank according to that order. For example, to find the 123rd
row ordering the rows by colA, colB descending, colC, where (colA, colB,
colC) is unique, this would work:
select top 1 * from (
select top 123 *
from T
order by colA, colB desc, colC
) T123
order by colA desc, colB, colC desc
Aside from orderings based on values in the table, there is no hidden
physical ordering of the rows in a table to access.
Steve Kass
Drew University
Enric wrote:
>Dear all,
>
>I think that it exists and I'm not dreaming. No identity field but just a internal flag or hide field which computes each record.
>
>'Id record'
>
>Any help will be very well received,
>
>
>
- Next message: Paul Connelly: "Re: bug or unknown feature in tsql/somewhere?"
- Previous message: rooster575: "Re: 3 SQL queries in 1 string...in what order will they execute?"
- In reply to: Enric: "id record for each table"
- Next in thread: Bradley M. Small: "Re: id record for each table"
- Reply: Bradley M. Small: "Re: id record for each table"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|