SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 SEC: UNCLASSIFIED Row id In SQLSERVER
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

shaneschmidt
Starting Member

Australia
17 Posts

Posted - 10/21/2002 :  19:46:35  Show Profile
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

USA
15658 Posts

Posted - 10/21/2002 :  19:54:17  Show Profile  Visit robvolk's Homepage
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
Flowing Fount of Yak Knowledge

USA
1429 Posts

Posted - 10/21/2002 :  22:38:17  Show Profile
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
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000