Can cursors be used in stored procedures called from a website? There is an obvious performance hit, but what I'm trying to pick up here is a problem with @@ Fetch_status variable. The @@ Fetch_status scope used in stored proc is a join. Is it not possible for two different users to invoke the same stored process from the same connection through the user interface? Won't it cause unexpected results?
In other words, will the fact that @@ Fetch_status is global, not only for the scope, but for the entire connection, cause any problems?
NOTE. This post is not about whether using the cursor is a good idea. I will be grateful for the answers related to @@ Fetch_status. Come here to discuss the pros and cons of cursors
developer747
source share