Answers for "select query to fetch parent and grand parent in sql"

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 "select query to fetch parent and grand parent in sql"

Code answers related to "SQL"

Browse Popular Code Answers by Language