2
Answers

Where we use Cursor and While loop in Store Procedure ?

Photo of Jayraj Chhaya

Jayraj Chhaya

2y
693
1

Hi,
I want to fetch some data row by row and some operations perform on each row so, suggest to me which one is better for that case and why?

Is cursor better or While loop in Store procedure?

ex - 

  1. I want to cumulative frequency from the data
  2. I want to copy each row in separate temp table. 

Answers (2)