We have a job that must process each new record in a SQL Server table. This table has a column Created with a constraint which defaults this column's value to GETUTCDATE(). The job's procedure is as follows:
- The job queries for all records whose 
Createdvalue is greater than or equal to the last seenCreatedvalue - The job processes all returned records
 - The job updates its last seen 
Createdvalue to the highestCreatedvalue it saw in the records. 
This seems to work pretty well, however, we have noticed that the job sometimes skips records. We believe this may be because of a scenario like:
- Transaction A starts to insert a new record. SQL Server defaults the 
Createdvalue to1 - Transaction B starts to insert a new record. SQL Server defaults the 
Createdvalue to2 - Transaction B commits
 - Job processes the table and sees the record created by transaction B. The job updates its last seen 
Createdvalue to2. - Transaction A commits
 - Job processes the table but "skips" the record created by transaction A as its 
Createdvalue is smaller than the last seenCreatedvalue. 
Is such a scenario possible? Will a read operation not block until the pending insert transactions are completed?