Is there any Property In MS SQL Server Like Rownum in Oracle
Messages   Related Types
This message was discovered on microsoft.public.dotnet.faqs.

Post a new message to this list...

Ashutosh
Hi All....

I have to write one query where i have to display the ID as 1,2 3, 4 in
oracle we used to ROWNUM to display ....in MS SQL server is there any
property to show???

i have to display like

ID ProgramCount
1 4
2 6
3 5
4 1
5 2

Ashutosh

--
Thanks & Regards,
Ashutosh Thaokar

Reply to this message...
 
    
Shankar Reddy
I don't think there is a direct way but you can get the same results with the following Select statement.

use pubs
GO
Select IDENTITY(int, 1,1) id, * INTO #Temp from authors
Select * from #Temp

try this.

Thanks,
Shankar Reddy

"Ashutosh" <Click here to reveal e-mail address> wrote in message news:Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
 




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com