资讯

Recursion is not intrinsically better or worse than loops—each has advantages and disadvantages, and those even depend on the programming language (and implementation).
Tim Chapman discusses your iteration choices in SQL Server 2008 and explains why determining which option performs better depends on the situation.