Go SET NOCOUNT on

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.