Usage of SET NOCOUNT ON [duplicate]
Possible Duplicate:
SET NOCOUNT ON usage
Why do we use the below statement in Trigge开发者_开发知识库rs and stored procedures?
SET NOCOUNT ON
Could any one explain me please? I have gone through the similar question posted before. But as I am new learning SQL, I am unable to understand their discussion.
When SET NOCOUNT is ON, the count (indicating the number of rows affected by a Transact-SQL statement) is not returned. When SET NOCOUNT is OFF, the count is returned.
So if you do an UPDATE query (for example) the query will not return the affected rows.
for more information check out => http://msdn.microsoft.com/en-us/library/aa259204(v=sql.80).aspx
精彩评论