Monday, March 12, 2012

Row ID

Does SQL maintain it's own Row ID's for records in a table? I was wondering
if there was a row id property that I could query on because the particular
table does not have any columns of type identifier or guid. If there is su
ch a property, what is the
correct syntax to use in the where clause?
Thanks in advanceSQL doesn't expose any physical row identifiers for use in queries. The way
to uniquely identify a row is, of course, by its primary key. If your table
doesn't have a primary key then you should add one.
David Portas
--
Please reply only to the newsgroup
--|||SQL Server does maintain a row id, but in the physical model which cannot be
accessed directly using a t-SQL query.
To access a row in a table using a SQL query you must have an set of column
values in a row which can uniquely identify a row in your table. The correct
approach to do this would be to define a primary key in your table; then
you'll be able to use these key column(s) in your WHERE clause.
- Anith
( Please reply to newsgroups only )|||Good thing Joe Celko doesn't frequent this group
"liz" <anonymous@.discussions.microsoft.com> wrote in message
news:2B33F68F-3091-4162-9A60-60BC2D599260@.microsoft.com...
quote:

> Does SQL maintain it's own Row ID's for records in a table? I was

wondering if there was a row id property that I could query on because the
particular table does not have any columns of type identifier or guid. If
there is such a property, what is the correct syntax to use in the where
clause?
quote:

> Thanks in advance
|||"Andy Williams" <f_u_b_a_r_1_1_1_9@.y_a_h_o_o_._c_o_m> wrote in message
news:#Hzqcz42DHA.536@.tk2msftngp13.phx.gbl...
quote:

> Good thing Joe Celko doesn't frequent this group

Who?

No comments:

Post a Comment