Sumar Khan

Sumar Khan

  • NA
  • 154
  • 5.4k

Adding value from One Table To Another And Update values

Feb 26 2016 1:16 PM
I have two tables  A and B In Sql:
A
Id       Name      Weight
1         Wheat         20 kg
2          Rice             30Kg
 
 
B
 
  Name          Weight
  Wheat              10kg
 
I want to Add value of Wheat  from Table A to B and update values according Like that  
  After Adding 20kg  in B The value of Wheat In Table B would become 30kg  and Value of Wheat in A become 0...
Plz Kindly tell me What query Will apply in Sql to such Scenario 

Answers (2)