I have several columns in a MySQL database that I would like to add and store in another column:
column1 column2 column3 subtotal 10 10
How about this?
UPDATE tableName SET subtotal = (column1 + column2 + column3)
If you really don't need subtotal column in table just use query as
SELECT *, (column1 + column2 + column3) as subtotal FROM tableName