Here's my table
id, parent_id, description
--------------------------
1 0 ABC
2 0 DEF
3 0 GHI
4 1 JKL
When retrieving my records how can I design the sql code to retrieve the data like so:
ID description child_id description
------------------------------------
1 ABC 4 JKL
Thanks.
id, parent_id, description
--------------------------
1 0 ABC
2 0 DEF
3 0 GHI
4 1 JKL
When retrieving my records how can I design the sql code to retrieve the data like so:
ID description child_id description
------------------------------------
1 ABC 4 JKL
Thanks.