Update Query In SQL With Syntax And Examples, How To Write Update Command In MySQL

Modification of the Database – Updates Query In SQL
* Increase all accounts with balances over $10,000 by 6%, all other accounts receive 5%.
* Write two update statements:
update account set balance = balance 1.06 where balance > 10000
* update account set balance = balance 1.05 where balance 10000
* Same query as before: Increase all accounts with balances over $10,000 by 6%, all other accounts receive 5%.
update account set balance = case when balance <= 10000 then balance *1.05 else balance * 1.06 end

0 comments:
Post a Comment
Thanks For Your Comment. We Get Back To You As Soon As Possible.