Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 NOCOUNT

Author  Topic 

shapper
Constraint Violating Yak Guru

450 Posts

Posted - 2007-09-14 : 11:32:43
Hello,

What is the default value for NOCOUNT in SQL 2005? On or Off?

This is what I know:
When NOCOUNT is OFF, @@ROWCOUNT returns the number of records if ExecuteNonQuery is used

But in my ASP.NET code I don't need to get the number of records.

Should I use it On or Off?

Thanks,
Miguel

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-09-14 : 11:39:38
default is OFF

nocount suppresses return of informational mesasges to the client.
it has nothing to do with @@rowcount

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-09-14 : 23:34:51
Set nocount on may speed up your app.
Go to Top of Page
   

- Advertisement -