Enter Ur Email ID To Get Study Material & Latest Job Updates In Mail Inbox:
(Please activate subscription from your mail Inbox)  FeedBurner

Home » » Update Query In SQL With Syntax And Examples

Update Query In SQL With Syntax And Examples

Written By Unknown on Monday, 22 April 2013 | 10:36 pm

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.