SET NOCOUNT is used to count the row that are affected by using the DML statement that is select, insert, delete and update. By default the SET NOCOUNT is OFF in SQL server that are show the number of affected rows. If you don’t want to show the affected row then you can use the SET NOCOUNT ON, then the number of affected rows will not appear.
Example- Following is a SQL statement that have no use of SET NOCOUNT ON or OFF but by default SET NOCOUNT is OFF in SQL server. You can use SET NOCOUNT OFF instead of none.
Now, the following SQL statement is execute with using of SET NOCOUNT ON,
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
SET NOCOUNT ON/OFF in SQL Server:
SET NOCOUNT is used to count the row that are affected by using the DML statement that is select, insert, delete and update. By default the SET NOCOUNT is OFF in SQL server that are show the number of affected rows. If you don’t want to show the affected row then you can use the SET NOCOUNT ON, then the number of affected rows will not appear.
Example- Following is a SQL statement that have no use of SET NOCOUNT ON or OFF but by default SET NOCOUNT is OFF in SQL server. You can use SET NOCOUNT OFF instead of none.
Now, the following SQL statement is execute with using of SET NOCOUNT ON,