In my table i've number of records like below format .
MY_TABLE_NAME
NUMBER | NAME | GROUP | PRIMARY NUMBER |
---|
1 | TEST 1 | ABC | |
2 | TEST2 | ABC | 1 |
3 | TEST3 | ABC | 1 |
4 | TEST4 | ABC | 2 |
5 | TEST5 | ABC | 2 |
6 | TEST6 | ABC | 3 |
7 | TEST7 | ABC | 4 |
8 | TEST8 | ABC | 5 |
from the above MY_TABLE_NAME is my table , for the table i need a procedure .
here if i pass 2 as a NUMBER value to the table i need to get all of its childs like 4,5,7,8
can some help me with the procedure for this scenario .
Thanks in advance .