In Ms-Sql 2005 and Oracle we have a built in function to generate row number or Serial no, But in
Ms-sql 2000 we have to generate serial no as follows!
CREATE TABLE Sample (
Number int
)
Insert Into sample
select 1 union
select 2 union
select 3 union
select 4 union
select 5 union
select 6 union
select 7 union
select 8 union
select 9 union
select 10
Select (select count(*) from Sample where number<=T.number) as Sno ,number
from Sample as T
Showing posts with label row number in mssql2000. Show all posts
Showing posts with label row number in mssql2000. Show all posts
Wednesday, July 8, 2009
Subscribe to:
Posts (Atom)

