title: Recursion In Oracle
body: <p>I have the following table in an oracle:</p>
  
  <pre><code>Parent(arg1, arg2)
  </code></pre>
  
  <p>and I want the transitive closure of the relation parent. That is, I want the following table</p>
  
  <pre><code>Ancestor(arg1, arg2)
  </code></pre>
  
  <p>How is this possible in Oracle?</p>
  
  <p>I am doing the following:</p>
  
  <pre><code>WITH Ancestor(arg1, arg2)  AS (
  
    SELECT p.arg1, p.arg2 from parent p
    UNION
    SELECT p.arg1 , a.arg2 from parent p,  Ancestor a 
    WHERE p.arg2 = a.arg1
  
  )
  
  SELECT DISTINCT * FROM Ancestor;
  </code></pre>
  
  <p>I get the error</p>
  
  <pre><code>*Cause:    column aliasing in WITH clause is not supported yet
  *Action:   specify aliasing in defintion subquery and retry
  Error at Line: 1 Column: 20
  </code></pre>
  
  <p>How can I solve this without column aliasing?</p>