Is there any way to exit WHILE @@FETCH_STATUS = 0db_cursor at runtime?
WHILE @@FETCH_STATUS = 0
I tried SET @@FETCH_STATUS = 1, but, as I expected, an error occurred. Help?
SET @@FETCH_STATUS = 1
You can use BREAKto exit the while loop.
BREAK