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. About cursor in sqlserver 2000

About cursor in sqlserver 2000

Scheduled Pinned Locked Moved Database
4 Posts 4 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.
  • Y Offline
    Y Offline
    yazan_zahi
    wrote on last edited by
    #1

    what are advantige and disAdvantige of using the cursor

    M 1 Reply Last reply
    0
    • Y yazan_zahi

      what are advantige and disAdvantige of using the cursor

      M Offline
      M Offline
      Marek Grzenkowicz
      wrote on last edited by
      #2

      http://www.sql-server-performance.com/cursors.asp[^]

      A 1 Reply Last reply
      0
      • M Marek Grzenkowicz

        http://www.sql-server-performance.com/cursors.asp[^]

        A Offline
        A Offline
        Amit Kumar G
        wrote on last edited by
        #3

        Cursors are having its own pros and cons. +Ve : Row wise operation which helps us to avoid lot of complex queries -Ve : VERY IMPORTANT, needs huge memory of SQL Server. So be careful while using cursor. It is always good if you avoid cursors as much. We have a product which has around 7500 stored procedure and we have written without any cursors :)) There are number of ways to avoid cursor.... 1) Use While Loop 2) Use Update with FROM Clause 3) Use Joins, use subqueries.. 4) Store data is views etc... 5) Last and least do good database desiging..... Amit

        G 1 Reply Last reply
        0
        • A Amit Kumar G

          Cursors are having its own pros and cons. +Ve : Row wise operation which helps us to avoid lot of complex queries -Ve : VERY IMPORTANT, needs huge memory of SQL Server. So be careful while using cursor. It is always good if you avoid cursors as much. We have a product which has around 7500 stored procedure and we have written without any cursors :)) There are number of ways to avoid cursor.... 1) Use While Loop 2) Use Update with FROM Clause 3) Use Joins, use subqueries.. 4) Store data is views etc... 5) Last and least do good database desiging..... Amit

          G Offline
          G Offline
          gopisant
          wrote on last edited by
          #4

          I think u r right we should avoid cursors as far as possible...I have a query of Dynamic sql how can I use it in a while loop?please help:confused:

          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