I have a table that has relation between rows.
Rows have a column [id] and a column [parent_id].
all are in the same table.
how can i recover all rows "down" from an ID like follows
select id where parent id = 3
then i will receive for instance : 4, 5, 6
i need to do the same query again for each value until there's nothing.
I'd like to create a Function that will receive a parameter with the id on top and receive all values that are found down.
thank you in advance