What is set nocount on and what is set nocount off?



What is set nocount on and what is set nocount off?..

Answer / Raj Kumar Vishwakarma

SET NOCOUNT ON and SET NOCOUNT OFF are SQL Server commands used to control the number of times that an explicit message indicating the number of affected rows is displayed during a batch of statements. By default, SQL Server sends a message after every Data Manipulation Language (DML) statement indicating the number of rows affected.nnSET NOCOUNT ON prevents this behavior, while SET NOCOUNT OFF allows it.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What are various ways to enhance the ssrs report?

1 Answers  


Explain the concept of recursive stored procedure.

1 Answers  


Why should one not prefix user stored procedures with ‘sp_’?

1 Answers  


what is diffence between replicaion and logshipping?

1 Answers  


How to create a trigger for insert only?

1 Answers  


How to convert numeric expression data types by assignment operations?

1 Answers  


Why use “in” clause in sql server?

1 Answers  


How do you delete a trigger?

1 Answers  


How to count the number of duplicate items in a table?

3 Answers  


Explain indexes disadvantages?

1 Answers  


What is the syntax for encrypting a column in SQL Server?

1 Answers   MindCracker,


What are cursors stored procedures and triggers?

1 Answers  


Categories