I have multiple computers that have the task of sending out emails found in a table on a common SQL Server. Each computer polls the email table to look for messages it can send by looking at a status flag set to 0. If a computer does a

```
SELECT * FROM tblEmailQueue where StatusFlag=0

```

if it returns a record it immediately sets the `StatusFlag` to `1` which should cause the other computer polling the same table not to find this record. My fear is that if two computer find the record at the same time before either can update the `StatusFlag`, the email will be sent twice. Does anyone have ideas on how to ensure only one computer will get the record? I know I might be able to do a table lock but I would rather now have to do this.