Buy Questpond's video subscriptions on
huge discount
.
Online: 3142
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Forums
>
Sql Server
>
Loading ...
what is this "SET NOCOUNT ON "
Posted by
Gow.Net
under
Sql Server
on 8/17/2012 |
Points: 10
| Views : 2305 | Status :
[Member]
| Replies : 8
Write New Post
|
Search Forums
|
Resolved Posts
|
Un Answered Posts
|
Forums Home
what is this "SET NOCOUNT ON " in stored procedure what is use of this?
gowthaman8870226416
Reply
|
Reply with Attachment
Alert Moderator
Responses
Posted by:
Ranjeet_8
on: 8/17/2012
[Member]
[MVP]
Gold
|
Points: 25
0
SET NOCOUNT is ON, the count is not returned and when SET NOCOUNT is OFF, the count is returned.
for more info plz refer this url :
http://www.dotnetfunda.com/articles/article581-set-nocount-transact-sql.aspx
Gow.Net
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Laghaterohan
on: 8/17/2012
[Member]
Starter
|
Points: 25
0
Hi,
SET NOCOUNT ON is a keyword of SQL server when used turns off / does not return the number of rows affected by the each T-SQL statement messages to the client.
When used in the stored procedure it greatly improves the performance, since putting this keyword does not return the number of rows affected messages to the client as it is of no use in this case.
Having thing information is useful when you have a normal query and not a stored procedure.
I hope this helps you.
Thanks.
Best Regards,
Rohan Laghate
Gow.Net
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Kirthiga
on: 8/20/2012
[Member]
Starter
|
Points: 25
0
SET NOCOUNT ON in stored procedure used to stop the message that shows the number of rows affected by the SQL statement.
Stored Procedure contains several select, alter and update statements. The result pan shows the number of rows affected by the SQL statement written in the stored procedure. By using SET NOCOUNT ON network traffic can be greatly reduced. The overall performance of the database must gradually increase.
Gow.Net
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Jasminej
on: 8/20/2012
[Member]
Starter
|
Points: 25
0
@Kirthiga
If so (NOCOUNT ON reduce the network traffic), How many bytes/KBs can be reduced ? for simple select statement which process 10 record(s) ?
thanks in advance
Gow.Net
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Kirthiga
on: 8/21/2012
[Member]
Starter
|
Points: 25
0
Hi Jasmine
I am not sure how you will get it in bytes.
But to know the performance eficiency of a query you can use sql server profiler.
For a single select statement network traffic will not have that much change.
By using query execution plan we can estimate cost for select statements.
Gow.Net
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Muhsinathk
on: 9/18/2012
[Member]
Bronze
|
Points: 25
0
"SET NOCOUNT ON " line of code, put at the top of a stored procedure turns off the messages that SQL Server sends back to the client after each T-SQL statement is executed. This is performed for all SELECT, INSERT, UPDATE, and DELETE statements. Having this information is handy when you run a T-SQL statement in a query window, but when stored procedures are run there is no need for this information to be passed back to the client.
Gow.Net
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Muhsinathk
on: 9/18/2012
[Member]
Bronze
|
Points: 25
0
Mark as answer if it helpful to you..That helps others who search the same...
Gow.Net
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Hariinakoti
on: 9/18/2012
[Member]
Starter
|
Points: 25
0
Nice Explanation
Thanks & Regards
Hari
Gow.Net
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Login to post response
Latest Posts
Istikhara ka Tarika Dawateislami
(0)
How to get the exact property name while getting error
(0)
PDB file is not showing Line Number in dot net application hosted on server
(0)
Both Strings morethan 5 letters in length end of the words one vowel and one consonent is different
(0)
how to check Any adjacent letters transposed between two strings(ex: JOHN, JHON)
(1)
can't receive data after success login ?
(1)
Implement Multi-Tenant in Azure Logic Apps
(0)
Why ASP.Net Core 7.0 Web API showing as Connection refused?
(0)
More ...