i heard often people said do not use cursor. so i like to know what is the down side of cursor usage in sql server store procedure and trigger.
share some points for which we should avoid cursor used in sql server store procedure and trigger. thanks
Shahriar NikkhahPosted Mar 24, 2018, 11:13 PM
Bhavesh JadavPosted Mar 23, 2018, 5:01 AM
Hello Tridip,
As per my experiance and knowledge,
and during execution of cursor, no another request can access these two tables.
Thanks.
Afzaal Ahmad ZeeshanPosted Mar 23, 2018, 4:38 AM
Also, cursors can also lead to memory leaks and locks the resources, if you do not properly dispose them and clear them out, or release the locks on the resources. But once again, it is based on the use case. Please provide a scenario and then we would be able to guide whether you need to use cursors to load the data or not.
Manav PandyaPosted Mar 23, 2018, 4:31 AM