dating tips for bad boys - How to use cursors for updating in pl sql
As a general rule of thumb one should always think twice, even three times whether the use of a cursor is acceptable for their current problem.
99% of the time the same problem can be dealt with in a purely transactional manner, as is the norm in T-SQL.
However, there are some situations in which cursors can be lifesavers.
I can think of a couple right off the bat: Running the basic SQL Server cursor above will loop through each ID in the #ITEMS table and SELECT its corresponding ITEM_DESCRIPTION in 5 separate transactions.
This means that it is designed to execute its work in all-or-nothing runs.