Exforsys
+ Reply to Thread
Results 1 to 2 of 2

About sub Quries

This is a discussion on About sub Quries within the SQL Server forums, part of the Database category; Hi Need help in sql sever2000 plz help to write query for the retriving the field values of nth row ...

  1. #1
    praveenmandadi is offline Junior Member Array
    Join Date
    Aug 2006
    Answers
    1

    About sub Quries

    Hi

    Need help in sql sever2000

    plz help to write query for the retriving the field values of nth row in a table or joining two tables


  2. #2
    jagadishbabub is offline Junior Member Array
    Join Date
    Apr 2008
    Answers
    7
    Hi Praveen,

    Try this .......

    SELECT * FROM
    (SELECT ROW_NUMBER() OVER(ORDER BY EMPNo) ROW_No, EMPNO, EMPNAME
    FROM EMP_DUPLICATE) AS Emp_Duplicate_WithRowNumbers
    WHERE ROW_No = n (n stands for the Row number which you want to retrieve)

    Regards,
    Jagadish Babu


Latest Article

Network Security Risk Assessment and Measurement

Read More...