MySQL and SQL Server – Oracle CONNECT BY PRIOR for Recursive, Hierarchical Data

Recursive queries are something I have used many, many times over the years to build dynamic, n-tiered hierarchies. Oracle’s CONNECT BY PRIOR is awesome.

Does anyone know if this is possible in SQL Server or MySQL?

From what I understand, stored procedures would need to be used in MySQL and SQL Server to accomplish what Oracle does in one SQL statement with CONNECT BY PRIOR. I need to dig into the other databases a bit further to verify, but I am interested in any elegant solutions people have come up with if you would like to share.

Leave a Reply

Your email address will not be published. Required fields are marked *