I have a table Emp which has these rows:
Emp_cd | Val1 | Val2 | Val3 | Total
-------+-------+-------+-------+-------
1 | 1.23 | 2.23 |
use a trigges it will work:-
->CREATE TRIGGER trigger_name BEFORE INSERT ON table_name
FOR EACH ROW SET NEW.column_name3 = NEW.column_name1 + NEW.column_name2;
this will only work only when you will insert a row in table not when you will be updating your table for such a pupose create another trigger of different name and use UPDATE on the place of INSERT in the above syntax