I have the following question about BD in sql, I have a value and I wanted to know if I can subtract it directly from the variable that is in the DB with a query or I will ask for that value, subtract it and then replace it in my DB.
I have the following question about BD in sql, I have a value and I wanted to know if I can subtract it directly from the variable that is in the DB with a query or I will ask for that value, subtract it and then replace it in my DB.
If possible, for example: UPDATE tabla SET campo1=campo1-campo2 WHERE id=2;
o UPDATE tabla SET campo1=campo1-25 WHERE id=2;