title: Oracle: MIN() Statement causes empty row returns
body: <p>I'm having a small issue with sorting the data returned from a query, with the aim of getting the oldest updated value in dataset so that I can update only that record. Here's what I'm doing:</p>
  
  <pre><code>WHERE ROWNUM = 1 AND TABLE1.ID != V_IGNOREID 
  AND TABLE1.LASTREADTIME = (SELECT MIN(TABLE1.LASTREADTIME) FROM TABLE1)
  ORDER BY TABLE1.LASTREADTIME DESC; 
  </code></pre>
  
  <p>It makes no difference as to whether the <code>ORDER BY</code> statement is included or not. If I only use the ROWNUM and equality checks, I get data, but it alternates between only two rows, which is why I'm trying to use the LASTREADTIME data (so that I can modify more than these two rows). Anybody have any thoughts on this, or any suggestions as to how I can use the MIN function effectively?</p>
  
  <p>Cheers</p>