what are the alternatives to using cursors in sql server.
i already know a trick which involves using the Row_Number() function which numbers the rows then i can loop over them one by one. any other ideas?
what are the alternatives to using cursors in sql server. i already know a
Share
When I don’t want to complicate things with SQL cursors I often populate temporary tables or table variables, then do a while loop to go through them.
For example: