title: Why subquery doesn't work in ON clause in DB2
body: <p>Why this simple query works fine in oracle but doesn't work in DB2:</p>
  
  <pre><code>select * 
  from 
  sysibm.dual d1 
  left join sysibm.dual d2 on 1=1 and exists (select 1 from sysibm.dual)
  </code></pre>
  
  <p>Moving subquery-involving condition to where clause may help, but that will restrain outer join into inner.</p>