Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

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;
 
PREVIOUS NEXT
Tagged: #parent #child #record #single #query #sql
ADD COMMENT
Topic
Name
3+3 =