title: SQL "Where exists" with multiple tables with aliases
body: <p>Example query:</p>
  
  <pre><code>Select id, id_dtm
  From tableA 
  Where exists (
   Select 1 
   From tableB b, tableC c, tableD d
   Where b.id = id
   And b.id_dtm = id_dtm
   And b.id = c.id
   And c.id = d.id);
  </code></pre>
  
  <p>The problem with the above query is that all 4 tables have columns named id and id_dtm. 
  When i run it, i get an error saying that the columns ORA-00918: column ambiguously defined</p>
  
  <p>I could have fixed by using an alias in tableA but the problem is that the query is generated dynamically. The <code>where exists</code> portion is generated somewhere else and the bit before it is merged later so i cant use an alias as it is now. </p>
  
  <p>Is there any way i can use id and id_dtm from tableA inside the <code>where exists</code> clause without using an alias for tableA?</p>
  
  <p>Database is Oracle10G</p>