Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. setcount on

setcount on

Scheduled Pinned Locked Moved Database
question
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vivek g
    wrote on last edited by
    #1

    why " setcount on" is used in stored procedures ? what does it actually means ? vivek

    F S 2 Replies Last reply
    0
    • V vivek g

      why " setcount on" is used in stored procedures ? what does it actually means ? vivek

      F Offline
      F Offline
      Frank Kerrigan
      wrote on last edited by
      #2

      used to display the "messages" return by running a sql statement. Experiment with it in Query Analyzer to see what it does to a basic SQL statement. Look where you want to go not where you don't want to crash. Bikers Bible

      1 Reply Last reply
      0
      • V vivek g

        why " setcount on" is used in stored procedures ? what does it actually means ? vivek

        S Offline
        S Offline
        sasidar_d
        wrote on last edited by
        #3

        Hi, I hope that there is no option such as setcount on in sql, Instead we have a statement set nocount on/Off The explanation is given below which is available in SQL books online please refer the same for further explanation Stops the message indicating the number of rows affected by a Transact-SQL statement from being returned as part of the results. Syntax SET NOCOUNT { ON | OFF } Remarks 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. The @@ROWCOUNT function is updated even when SET NOCOUNT is ON. SET NOCOUNT ON eliminates the sending of DONE_IN_PROC messages to the client for each statement in a stored procedure. When using the utilities provided with Microsoft® SQL Server™ to execute queries, the results prevent "nn rows affected" from being displayed at the end Transact-SQL statements such as SELECT, INSERT, UPDATE, and DELETE. For stored procedures that contain several statements that do not return much actual data, this can provide a significant performance boost because network traffic is greatly reduced. The setting of SET NOCOUNT is set at execute or run time and not at parse time. Happy Programming

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups