KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am using postgresql. I have the table as like below parent_id child_id ---------------------- 101 102 103 104 104 105 105 106 I want to write a sql query which will give the final parent of input. i.e suppose i pass 106 as input then , its output will be 103. (106 --> 105 --> 104 --> 103)
Tags (comma-separated)
Save Edits
Cancel