Loading ...

SET NOCOUNT in sql server | CodeAsp.Net

SET NOCOUNT in sql server

 /5
0 (0votes)

It stops the message that shows the count of the number of rows affected by a Transact-SQL statement or stored procedure from being returned as part of the result set.

Syntax

SET NOCOUNT { ON | OFF } 

for example

set nocount on

select * from Table

here message displayed

Command(s) completed successfully.
if we don't Set NOCOUNT on then message displayed
 (n row(s) affected)
here n could be any number of rows

Comments (no comments yet)

Top Posts