Ø When SET NOCOUNT is ON, the count (indicating the
number of rows affected by a Transact-SQL statement) is not returned. When SET
NOCOUNT is OFF, the count is returned. It is used with any SELECT, INSERT, UPDATE, DELETE statement.
Ø The setting of SET NOCOUNT is set at execute or run
time and not at parse time.
Ø SET NOCOUNT ON improves stored procedure (SP)
performance.
Ø Syntax: SET NOCOUNT { ON | OFF }
Example of SET NOCOUNT OFF:
The "SET NOCOUNT" statement in SQL Server controls the message indicating the number of rows affected by a query. Card For Gaming Turning it ON suppresses these messages, reducing network traffic.
ReplyDelete