Pages

Saturday, September 21, 2013

SQL SERVER – SET ROWCOUNT – Retrieving or Limiting the First N Records from a SQL Query | Journey to SQL Authority with Pinal Dave

A SET ROWCOUNT statement simply limits the number of records returned to the client during a single connection. As soon as the number of rows specified is found, SQL Server stops processing the query. The syntax looks like this: SET ROWCOUNT 10 SELECT * FROM dbo.Orders WHERE EmployeeID = 5 ORDER BY OrderDate SET ROWCOUNT… Continue Reading...

Source: SQL SERVER – SET ROWCOUNT – Retrieving or Limiting the First N Records from a SQL Query | Journey to SQL Authority with Pinal Dave

No comments:

Post a Comment