title: oracle nested select query
body: <p>I have this table on oracle db:</p>
  
  <p><img src="https://i.stack.imgur.com/MaAZ9.png" alt="Original table"></p>
  
  <p>Can i do nested select query that change the PARENT column to the name associated with it?
  like this:</p>
  
  <p><img src="https://i.stack.imgur.com/pzvEd.jpg" alt="Would like to have table"></p>
  
  <p>I have tried:</p>
  
  <pre><code>SELECT PC.ID
  ,(
    SELECT PC.NAME from PRODUCTS_CATEGORIES PC where PC.PARENT = PC.ID
   )
   ,PC.NAME
    FROM PRODUCTS_CATEGORIES PC 
  </code></pre>
  
  <p>and got this error:</p>
  
  <pre><code>Error Message: ORA-01427: single-row sub query returns more than one row
  </code></pre>