Hallo,
kann jemand mir sagen, warum ich diese Fehlermeldung verdient habe?
+---------+---------+
| child | parent |
+---------+---------+
| john | sam |
| john | julie |
| sam | george |
| sam | jean |
| julie | hank |
| julie | lucy |
| jean | bill |
| jean | suzy |
| suzy | william |
| suzy | lizzy |
| william | mary |
+---------+---------+
mysql> with recursive Ancestor(person, ancestor) AS ((select * from Parent) UNION ALL (select Ancestor.person, Parent.parent from Ancestor, Parent where Ancestor.ancestor = Parent.child)) select * from Ancestor where child = "john";
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'with recursive Ancestor(person, ancestor) AS ((select * from Parent) UNION ALL (' at line 1