Link to home
Start Free TrialLog in
Avatar of bethamsetty
bethamsetty

asked on

what is substitution of ROWID and ROWNUM of Oracle in SQLServer

Hi ,
    usually in Oracle people uses ROWID and ROWNUM in Oracle.  I want to know what is the same we can use in SQL Server ?

 help would be appreciated

Regards
Sridhar.B
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

ROWID:
  there is NO replacement (btw, ROWID is to be used carefully in Oracle)

ROWNUM:
  SQL Server 2005:
     you have a ROW_NUMBER() function

  SQL Server in general:
     when you want to get only the first x rows:
     SELECT TOP x ... FROM ... WHERE ...
Avatar of bethamsetty
bethamsetty

ASKER

Hi,
   ROW_NUMBER() can be used for SQL Server 2005 not for 2000.  I want it for 2000 and another thing is TOP x.. is used to retrive top rows but if i want to retrieve a range then what is the option
    ex:
       I want to maintain paging in VB by using SQL Server 2000
         First user will view 100 rows next i want to  bring 100 to 200 rows...

Regards
Sridhar.B
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial