title: SQL traversal issue without duplicate data
body: <p>i got a dataTable for the menu info</p>
  
  <pre><code>Id  P_ID  Name
  1   null  Main
  2   1     menu1
  3   1     meun2
  4   1     menu3
  5   2     menu1_1
  6   5     menu1_1_1
  7   3     menu2_1
  8   4     menu3_1
  </code></pre>
  
  <p>when i got id 6 ,7
  how can i get the data like that</p>
  
  <pre><code>Id  P_ID  Name
  1   null  Main
  2   1     menu1
  3   1     meun2
  5   2     menu1_1
  6   5     menu1_1_1
  7   3     menu2_1
  </code></pre>
  
  <p>and without duplicate data</p>