Some SQL DBMs allow to create recursive queries. That's a feature of DB2 (free download ), SQL Server and Oracle. Unfortunately mySQL misses this feature. But every recursive algorithm can be written in a non recursive way - so it's not clear whether this is a need or just a nice DBMS feature. Anyhow - it's an interesting topic.
References:
1) DB2
2) Joe Celco
3) Trees and other hierachies (no recursion)

