递归联接通常用于获取父子数据。在SQL中,它们使用递归公用表表达式实现,例如:
WITH RECURSIVE MyDescendants AS ( SELECT Name FROM People WHERE Name = 'John Doe' UNION ALL SELECT People.Name FROM People JOIN MyDescendants ONPeople.Name= MyDescendants.Parent ) SELECT * FROM MyDescendants;
友情链接: json在线解析 通晓查询 糯晒黄历 姓名打分