Wednesday, June 27, 2012

SQL Server - Set Nocount On

SQL Server - Set Nocount On      
   
when you use the "set nocount on" sql server will not count how many row are effecting. that way it's imporve the performance of query of stored procedure.
Example 1:
set nocount on
 
select * from User_Details

Result: Command(s) completed successfully.

Example 2:

set nocount Off

 select * from User_Details 

Result : (12 row(s) affected)





I hope it will help you
 

Like and Share to SQL Integrity Blog

2 comments:

  1. Replies
    1. Thanks lalit... if you have any query on SQL Server please let me know i ll try to give the solution

      Delete

Thank You !!!!