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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Row number in SELECT

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-09-07 : 09:58:26
Gopal writes "I am using SQL Server 7.0.
I Need to have row numbers for each row of the select query result. For example if Authors table has got 20 rows, my query should give result something like....

Row AuthorID Name
1 A1 David
2 A2 Thomas
3 A3 John
4 A4 Rogger
5 A5 Albert

I dont want to create a temporary table to maintain rowid. Also, I dont want to declare any column in a table as Identity column.
My requirement is to get all the columns with rowid included in one "Select" statement. I would appreciate if somebody knows solution.

Thanks in Advance,
Gopal."
   

- Advertisement -