Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BEGIN TRAN A
- SELECT id
- FROM Inventory
- WITH (???)
- WHERE material_id = 25 AND quantity > 10
- /*
- Process some things using the inventory record and
- eventually write some updates that are dependent on the fact that
- that specific inventory record had sufficient quantity (greater than 10).
- */
- COMMIT TRAN A
- SELECT id
- FROM Inventory (UPDLOCK)
- WHERE material_id = 25 AND quantity > 10;
- http://www.devx.com/tips/Tip/13134
- SELECT id
- FROM Inventory
- WHERE material_id = 25 AND quantity > 10
- FOR UPDATE;
Add Comment
Please, Sign In to add comment