title: Row locking in oracle table with no rows selected
body: <p>If I am running a <code>SELECT ……. FOR UPDATE</code> query on a table in oracle for which no row is returned still a row level lock is created. For example if the below query is executed no record is returned because there is no value of object_key which has a value of ‘xxx’ in the table. </p>
  
  <pre><code>select * from payment_detail where object_key = 'xxx' for update;  
  </code></pre>
  
  <p>However after the query is executed there is a row level lock created in the table PAYMENT_DETAIL as confirmed by querying the table <code>v$locked_object</code>. Could you please suggest how a row level lock is created in this scenario (when no record is getting returned by the query)</p>