How to make Arithmetic operation on mysql DATABASE EASY
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
Commentaires
Enregistrer un commentaire