title: How to select and delete at once in DB2 for the queue functionality
body: <p>I am trying to implement simple table queue in DB2 database. What I need
  is to select and delete the row in the table at once so the multiple clients will not get the same row from the queue twice. I was looking for similiar questions but they describes the solution for another database or describes quite complicated solutions. I only need to select and delete the row at once.</p>
  
  <p>UPDATE: I found on the web db2 clause like this, which look exactly like what i need - the select from delete: example: 
  SELECT * FROM OLD TABLE (DELETE FROM example  WHERE example_id = 1)</p>
  
  <p>but I am wondering if this statement is atomic if the two concurent request don't get the same result or delete the same row.</p>