Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Old Forums
 CLOSED - General SQL Server
 SEC: UNCLASSIFIED Row id In SQLSERVER

Author  Topic 

shaneschmidt
Starting Member

17 Posts

Posted - 2002-10-21 : 19:46:35
Is there an attribute that will identify the Row id
in a Transact SQL Statement or stored procedure ?
I know they have row id in Oracle but am unsure of SQL SERVER 2000

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-10-21 : 19:54:17
No. You would need to create a primary key on your table to ensure that each row is uniquely identifiable. You can use an identity column (not recommended) or a GUID column to generate unique values, but they DO NOT work like rowid or rownum in Oracle, because they are not row "numbers". Row numbers are not a relational database feature.

Go to Top of Page

ValterBorges
Master Smack Fu Yak Hacker

1429 Posts

Posted - 2002-10-21 : 22:38:17
If you're looking to number you rows based on how your SQL Statement orders the records then take a look.
http://www.sqlteam.com/item.asp?ItemID=1491

Go to Top of Page
   

- Advertisement -