If it is the parent node ParentID default to 1, the father NAME is empty
Table structure is: the ID ParentID TheName
CodePudding user response:
Select * from table name a LEFT JOIN table name ON Amy polumbo arentID b=b.I D
CodePudding user response:
Select ID, TheName, ParentID, (select * from table NAME as a where Anderson, d=p. arentID) as the parent NAME from the NAME of the table as b so great