I have a table "family_tree". It has three columns "id", "parent_name", parent_id".
--id-- --parent_name-- --parent_id--
1 Parent 1 Null
2 Parent 2 1
3 parent 3 2
The family tree for id 3 would be 3-->2-->1 . Is it possible to to have a recursive SQL query to find the family tree line for a given id using SQL? If it is possible how do I write the query?