Is the nocount in SQL for each connection or each execution?
Consider the following
-- Proc to return data.
-- nocount is set to on (no row count returned)
create procedure procOne as
set nocount on
select * from myTable
If I have an application that calls procOne and then performs a SQL call such as: DELETE from myTable where foo = bar
Will the delete statement return the number of rows deleted? I say yes.
The procedure should only set the nocount value within its execution. Please let me know if this is correct.
Thanks