I have got a table of TID's which have an available flag<br>What I want to do is take off the next available TID and mark it as unavailable. Ive done the SQL for that<br><br>UPDATE TIDS <br>SET Available=0<br>WHERE ID IN (SELECT TOP 1 ID FROM TIDS WHERE Available=1 ORDER BY TID)<br><br>The only problem is I have no idea which TID it has updated. Is there some way of telling - like @@IDENTITY when you do an INSERT. <br>I would like to do it all in one SQL statement because this procedure is going to take some hammering and I don't want to risk two instances conflicting with each other.<br><br>Sorry Im in a rush..but you get the jist of the problem.<br><br>Thanks in advance.<br>