October 31, 2017 at 1:27 pm
Hi,
Sorry If it is a lame question. I am trying to understand the cursors.
I dont understand the difference between @@Cursorrows and @@FetchStatus
I understand that @@Countrows >0 mean "If there are rows" fetch the rows into...@Id,@Name
why again fetch_status=0??I read somewhere that it returns 0 as long as there are rows in the table. I don't understand as these both looks same
Appreciate your time and help
October 31, 2017 at 1:38 pm
@@FETCH_STATUS will indicate if rows are successfully brought back from the cursor, @@CURSOR_ROWS returns the number of qualifying rows currently in the last cursor opened on the connection. Obviously you want to use the former for controling the cursor loop.
😎
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply