Suppose I have this table:
Now if I need to get the path to the root node from any node , how will I get that ?
Suppose I have searched for id=28, then I want to get (0,19,20) path to root node by parent_id.
Update on Abhik Chakraborty's comment: Please note that , I am not asking for any hierarchical query.
Update on Shadow's Comment : I cannot use procedure that's why I asked for help on query. Please don't answer any stored procedure.