Answer: This syntax is used in SQL Server to stop processing the query after the specified number of rows are returned.
Example:
SELECT * FROM EMPLOYEES
- It will return 10 rows of records.
After add SET ROWCOUNT
SET ROWCOUNT 5
SELECT * FROM EMPLOYEES
- It will return 5 rows of records instead of 10 row.
(Bacause you set the RowCount to 5)
Asked In: Many Interviews |
Alert Moderator