title: Select 1 from dual where exists (select ....). Returns 1 even if the table is completely empty?
body: <p>I'm using a Select 1 from dual statement to see if new data that comes into my system is actually new or not, if it is new then it's gonna be inserted, if it is not then it's gonna be updated in the database.</p>
  
  <pre><code>sql.CommandText = "select 1 from dual where exists (select * from my table where hour = " + hour + " and zone = '" + zone+ "' and date = TO_DATE('" + mydate + "','DD-MM-YY'))"
  </code></pre>
  
  <p>The problem however is that after running the statement, it returns the 1 value even if the conditions for it aren't met, even if the table is completely empty. How could this happen?
  I'm using VB, .NET framework 3.5 and Oracle 10g.</p>