title: sql multithreading application select and delete from a table
body: <p>I am developing a multi-thread application (could be considered as a client-server) which processes data. The below is the high level description of the application.</p>
  
  <p>there is a table (with no key and Id field) with many rows in our database server. I have several systems (threads) which read (select) some rows (fixed number of rows) from the table and process them and remove (delete) those rows from the table.  </p>
  
  <p>I am looking for a solution for removing (deleting) data without using a temp table; but any ideas with temp storage are welcome. </p>
  
  <p>P.S: By using locks and a temp table, I solved the reading process but I need help on deleting part.</p>
  
  <p>P.S2: One possible solution that Jean said is not removing rows physically from the table. This idea is great but I forgot to mention that this table must be empty after a specific period of time and by using the solution I need to have a system which deletes all the marked rows at the end (which is not possible)</p>