Hi
Manish,
SELECT * FROM (
SELECT
ROW_NUMBER() OVER (ORDER BY columnname ASC) AS rownumber,
columnname
FROM tbl_studreg
) AS foo
WHERE rownumber =5 or rownumber = 6
DEfinitely it will work :-):-)
Improved Answer
SELECT * FROM (
SELECT
ROW_NUMBER() OVER (ORDER BY ID ASC) AS rownumber,
ID
FROM tablename
) AS foo
WHERE ID =5
For "ID" Replace ur condition column
The condition column name must be primary key