I have the following table:
+----+-----------+------+
| ID | Parent_ID | Name |
+----+-----------+------+
| 1 | null | A |
| 2 | null | B |
| 3 | null | C |
| 4 | 1 | D |
| 5 | 4 | E |
| 6 | 2 | F |
+----+-----------+------+
And I need to get table like this:
+----+------+
| ID | Name |
+----+------+
| 1 | A |
| 2 | B |
| 3 | C |
| 4 | AD |
| 5 | ADE |
| 6 | BF |
+----+------+
I checked the ORACLE related questions here, but I did't find anything useful.