DF210: The SET NOCOUNT OFF statement is used.
Last modified: May 28, 2025
The topic describes the DF210 T-SQL code analysis rule.
Category
PERFORMANCE
Message
The SET NOCOUNT OFF statement is used.
Description
Turning off the NOCOUNT setting is not recommended, as it results in sending unnecessary messages to the client.
Additional information
It is important to note that turning off the NOCOUNT setting is generally not recommended. This setting suppresses the “xx rows affected” message that SQL Server sends to the client after executing statements. By leaving NOCOUNT on, unnecessary messages are avoided, reducing network traffic and potentially improving performance, especially in scenarios involving multiple statements or large result sets.
Noncompliant code example
CREATE PROCEDURE dbo.DemoProc
AS
BEGIN
SET NOCOUNT OFF;
SELECT * FROM dbo.DemoTable
END
GO
Compliant solution
CREATE PROCEDURE dbo.DemoProc
AS
BEGIN
SELECT * FROM dbo.DemoTable
END
GO
Want to find out more?
Overview
Take a quick tour to learn all about the key benefits delivered by dbForge Studio for SQL Server.
All features
Get acquainted with the rich features and capabilities of the tool in less than 5 minutes.
Request a demo
If you consider employing this tool for your business, request a demo to see it in action.