Oracle 10g PL/SQL Connect By Prior returning Child and Parent on same row
问题 Table1: Child Parent a Bob Chris 2 Chris Kate 1 Shane Lana 3 Nala Bob 4 Table2: b Talent 1 'something' 2 'nothing' 3 'something' 4 'nothing' SELECT Child FROM Table1 INNER JOIN Table2 ON (Table1.a = Table2.b) WHERE Table2.Talent = 'something' connect by prior Table1.Child = Table1.Parent This code returns rows of parents Chris If the "Where" clause was not included, the code would return: Bob Chris Kate Chris Kate Shane Lana etc What I want to return is the following in a row, not in columns: