How do I update a column in all rows of a table based on values in other columns (for the same row)?
As has already been answered a simple update can be done using:
UPDATE MyTableSET Column3 = Column1 + Column2;
However storing caclulated values, especially for simple calculations is not good practice (there are always exceptions and this is a guideline not a rule), if column3 should always be the sum of Column1 and column2 then if your DBMS permits it you could create a calculated column.
e.g. In SQL-Server:
ALTER TABLE MyTable ADD Column4 AS Column1 + Column2;
If your DBMS does not permit computed columns then you could create a view, so you are only storing the base data and not the calculation (again syntax may vary by DBMS):
CREATE VIEW myTableWithTotalAS SELECT Column1, Column2, Column1 + Column2 AS Column2 FROM MyTable
Either of these methods will ensure your column3 value remains up to date even if column1 or column2 are updated