Forum

What is the user of...
 
Notifications
Clear all

What is the user of Cursor ?


Info User 2
Posts: 47
 Info User 2
Topic starter
(@Info User 2)
Joined: 1 year ago

Can anyone help what is the user of Cursor ? 

1 Reply
Sudheep Jain
Posts: 36
 Sudheep Jain
(@Sudheep Jain)
Joined: 1 year ago

The major function of a cursor is to retrieve data, one row at a time, from a result set, unlike the SQL commands which operate on all the rows in the result set at one time. Cursors are used when the user needs to update records in a singleton fashion or in a row by row manner, in a database table

Cursors are very bad for performance and should be avoided always. Most of the time, cursors can be very easily replaced using joins.

There are different types of cursors in SQL server as listed below. 

1.Forward-Only
2.Static
3.Keyset
4.Dynamic

Reply
Share: