Home  >  Article  >  Backend Development  >  mysql如何实现递归查询数据?

mysql如何实现递归查询数据?

WBOY
WBOYOriginal
2016-06-23 14:02:011188browse

不用存储过程,不写函数,如何实现?求大神们指教...


回复讨论(解决方案)

mySQL 没有 WITH 命令,所以 不用存储过程,不写函数 就不可能实现
只有支持 WITH 命令的 oracle 和 sqlserver 可以在命令级实现递归查询

可以变相实现的,想了一下午相出来了。。。

可以变相实现的,想了一下午相出来了。。。
怎么实现的呢?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn