UPDATE store SET amount = amount - 2 WHERE product=123456 AND amount>2
UPDATE store WITH (ROWLOCK) SET amount = amount WHERE product=123456 AND amount>2
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)