These are the commands used to get the desired n-row count from table in SQL, Here you will get count from table of 10 records!. Declare a variable and set it value as like as you want here.
SET ROWCOUNT 10
SELECT *
FROM dbo.Orders
WHERE EmployeeID = 5
ORDER BY OrderDate
SET ROWCOUNT 0
SELECT *
FROM dbo.Orders
WHERE EmployeeID = 5
ORDER BY OrderDate
SET ROWCOUNT 0

No comments:
Post a Comment