Assuming a Read Committed Snapshot transaction isolation setting, is the following statement \"atomic\" in the sense that you won\'t ever \"lose\" a concurrent increment?
No, it's not. The value is read in shared mode and then updated in exclusive mode, so multiple reads can occur.
Either use Serializable level or use something like
update t set counter = counter+1 from t with(updlock, ) where foo = bar