Monday, 12 November 2012

How to get specific records from a table in sql?


--how to get specific records from a table
SELECT  EmpNo, EmpName, Emppost
FROM     (SELECT  ROW_NUMBER() OVER (ORDER BY EmpNo  ASC) AS Row,
          EmpNo, EmpName, Emppost
FROM    EmployeeRecord) tmp
WHERE   Row >= 5 AND Row <= 15

No comments:

Post a Comment