id Parant_ID sort_nm Scheme_Name
5 5 CAMPA CAMPA
6 5 NPV Net Present Value
7 5 CA Compensatory Afforestation
8 6 ACA Additional Compensatory Afforestation
43 8 asd asdasd
45 45 new new
46 45 asdaasdas asdasdasdas
I have the above tree structure in SQL Server.
I want to know the root node id of every node.