I need to update multiple rows and same column name with faster way. Till now i'm using this;
Begin Transaction;
Update Inventory set Quantity-=1 where ID=1;
Update Inventory set Quantity-=4 where ID=2;
Update Inventory set Quantity-=1 where ID=1;
Update Inventory set Quantity-=5 where ID=4;
Commit;
This method works well, but i dont if it fast to write all the query for each value in same table.Any suggestions? As i read sql server doesnt support duplicate key update...