Click here to Skip to main content
15,905,679 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
We can do update, delete, sum(amount),alter using Cursor in sql. But we can do this using normal queries also. Then why does we use Cursor though it is very slow to return output?

What I have tried:

Tried some Cursor examples from Google.
Posted
Updated 17-Nov-17 23:40pm

 
Share this answer
 
It's quite probable that you do not need a cursor at all. SQL is set-based.

I wrote an article to explain why Processing Loops in SQL Server[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900