title: SQL Server, using a table as a queue
body: <p>I'm using an SQL Server 2008 R2 as a queuing mechanism. I add items to the table, and an external service reads and processes these items. This works great, but is missing one thing - I need mechanism whereby I can attempt to select a single row from the table and, if there isn't one, block until there is (preferably for a specific period of time). </p>
  
  <p>Can anyone advise on how I might achieve this? </p>