How cursor is different from while loop. Execution wise which is faster and safe in case of failure.
            Asked
            
        
        
            Active
            
        
            Viewed 84 times
        
    1 Answers
1
            
            
        Cursor is kind of pointer variable to a table row, where you loop over the rows by using the loop. So, answering to your question which is faster, then i would say loop and cursor are two different things cursor is a variable and loop is a iterator, and without loop you can't use the cursor.
Also, i suggest if possible you can use recursive CTE, to perform the operation that you are doing via cursor.
        Neet Singh
        
- 167
 - 1
 - 9