I have written the below query. I do not think it is the optimum way. The scenario is - given a child, I want to fetch all rows corresponding to its parent(root).
select * from TableA where column_root =
(select column_root from TableA where column_child = 123)