Answers for "how to get parent and child record in single query using sql not using cte"

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 "how to get parent and child record in single query using sql not using cte"

Code answers related to "SQL"

Browse Popular Code Answers by Language