Articles

Affichage des articles associés au libellé minus operation in mysql

How to make Arithmetic operation on mysql DATABASE EASY

Image
Let say we have a table called transaction and differents columns  we want to make this operation montant=500 -100 with the column  idtransaction  and montant  Step 1: Write this command in mysql: update transaction set montant= montant -100 where idtransaction= -1; The result is: 400 We did a minus operation 500-100 = 400  in mysql