title: Oracle - using connect by prior in Hierarchical Queries and put them into rows
body: <p>I am new in Oracle, I am going to use connect by prior to implement the flat table instead of  Hierarchical one. but I am a little bit confuse. My table is like this:
  empTabl:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>empID</th>
  <th>empName</th>
  <th>managerID</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>100</td>
  <td>Sara</td>
  <td>110</td>
  </tr>
  <tr>
  <td>101</td>
  <td>Ben</td>
  <td>111</td>
  </tr>
  <tr>
  <td>102</td>
  <td>Alex</td>
  <td>110</td>
  </tr>
  <tr>
  <td>110</td>
  <td>Ross</td>
  <td>111</td>
  </tr>
  <tr>
  <td>111</td>
  <td>Mon</td>
  <td>NULL</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I am going to change the table like this(output):</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>emp</th>
  <th>empName</th>
  <th>subBoss</th>
  <th>subBossName</th>
  <th>Boss</th>
  <th>BossName</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>100</td>
  <td>Sara</td>
  <td>110</td>
  <td>Ross</td>
  <td>111</td>
  <td>Mon</td>
  </tr>
  <tr>
  <td>101</td>
  <td>Ben</td>
  <td>111</td>
  <td>Mon</td>
  <td>NULL</td>
  <td>NULL</td>
  </tr>
  <tr>
  <td>102</td>
  <td>Alex</td>
  <td>110</td>
  <td>Ross</td>
  <td>111</td>
  <td>Mon</td>
  </tr>
  <tr>
  <td>110</td>
  <td>Ross</td>
  <td>111</td>
  <td>Mon</td>
  <td>NULL</td>
  <td>NULL</td>
  </tr>
  <tr>
  <td>111</td>
  <td>Mon</td>
  <td>NULL</td>
  <td>NULL</td>
  <td>NULL</td>
  <td>NULL</td>
  </tr>
  </tbody>
  </table>
  </div>