|
Posted by Doug on 10/01/34 11:41
David Portas wrote:
>That the resource
constraints on cursors are inherently less onerous than on recursive
queries?
There is a proof, genearally accepted as valid, that any mathematical
construct or programming problem that can be solved using a loop can
also be solved by using recursion.
However, in most of the languages I have found looked at, there is a
wall of some sorts limiting how many times you can recurse. As an
example, LISP is designed to recurse, and there is no practical limit.
On the other hand, SQL has almost no practical limit for looping in
most implementations.
My question was...... Does the SQL spec have any hints as to a minimum
recursion required? Is there any real limit in SQL server? I've done
almost no recursion in SQL. Kind of a different mind set, and I just
don't think that way in SQL.
Recursion for the right problem can be a truly elegant solution.
[Back to original message]
|