Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. DECLARE @amount decimal(18,2) = 1000
  2. UPDATE account
  3. SET balance = balance + @amount WHERE accountID= 1;
  4. UPDATE account
  5. SET balance = balance - @amount WHERE accountID= 2;
  6.  
  7. DECLARE @amount decimal(18,2) = 1000
  8. UPDATE account
  9. SET balance = balance + @amount WHERE accountID= 1;
  10. AND
  11. SET balance = balance - @amount WHERE accountID= 2;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement