Answers for "sql get parent from child"

SQL
0

how to get parent and child record in single query using sql

SELECT child.Id,
       child.Name,
       child.ParentId,
       parent.Name as ParentName
FROM your_table child
JOIN your_table parent ON child.ParentId = parent.id;
Posted by: Guest on May-09-2021

Code answers related to "sql get parent from child"

Code answers related to "SQL"

Browse Popular Code Answers by Language