Write a query to get hierarchical data from a table where parent child relationship is maintained by I'd and parent I'd in same table.
AnswerBot
1y
Query to retrieve hierarchical data from a table with parent-child relationship maintained by ID and parent ID.
Use a self-join to join the table with itself based on the parent ID and ID columns.
Use a...read more
Help your peers!
Add answer anonymously...
Popular interview questions of Consultant
Top HR questions asked in Bristlecone Consultant
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app