Ref:http://www.cnblogs.com/jayleke/archive/2010/07/10/1774758.html
In the stored procedure, the trigger, often uses the set NOCOUNT on;
Effect: Prevents the return of row count information in the result set that is displayed by T-SQL statements or by USP. When set NOCOUNT on, the count is not returned, when set NOCOUNT off, the count is returned;
The @ @RowCount system function is updated even when set NOCOUNT on;
When set NOCOUNT on, the DONE_IN_PROC message for each statement of the stored procedure will not be sent to the client, and if the stored procedure contains statements that do not return actual data, network traffic will be greatly reduced, which can significantly improve application performance;
Set NOCOUNT the specified setting takes effect during execution or runtime and does not take effect when parsing.
1Use Northwind2go3 set NOCOUNT off;4 Select TOP 5 OrderDate from Orders5 GO
The result set shows:
1SET NOCOUNTOn;2select top 5 OrderDate from Orders3 go
Go SET NOCOUNT on