TABLE
CHILD PARENT NAME
1 2 V1
2 0 V2
3 1 V3
4 2 V4
5 0 V5
I want to print CHILDNAME and its PARENTNAME . What would be the query ?
TABLE
CHILD PARENT NAME
1 2 V1
2 0 V2
3 1 V3
4 2 V4
5 0 V5
I want to print CHILDNAME and its PARENTNAME . What would be the query ?
SELECT child.name AS child_name
, parent.name AS parent_name
FROM daTable AS child
LEFT OUTER
JOIN daTable AS parent
ON parent.child = child.parent