mysql - sql query to modify the selected value from database -
i have table number(int value). if want add or subtract value, how should proceed? ex: value 30. want subtract 7 make 23. should query like?
update table1 set numberfield = numberfield - 7
if numberfield 30, numberfield = 30 - 7, difference new value of field
Comments
Post a Comment