下面是一个mssql函数的内部 - 返回给定节点的函数及其所有子节点 - 我需要将其转换为mysql - 我尝试了一个mysql视图但是我在heidisql中得到了一些奇怪的错误有助于翻译吗?
WITH ListOfNodes AS
(
SELECT * FROM Location WHERE LocationID=80
UNION ALL
SELECT Location.* FROM Location
JOIN ListOfNodes ON Location.LocationID_parent = ListOfNodes.LocationID
)
SELECT * FROM ListOfNodes
感谢