Without using CURSOR
and WHILE
in SQL Server
, what other ways would you be able to traverse the result lines of a SELECT
to a STORED PROCEDURE
?
Without using CURSOR
and WHILE
in SQL Server
, what other ways would you be able to traverse the result lines of a SELECT
to a STORED PROCEDURE
?
By taking CURSOR
and WHILE
I do not believe there is any other way.
In Oracle, we have a % with% loop , but this does not exist in SQL Server. But I do not see the real need to have even more ways to iterate a FOR
beyond these two cases.
Iterate the results, even if using SELECT
, I no longer think a good idea because it is not performative, imagine a CURSOR
or any other loop.