Use trigger to populate another column
You can use a generated column in your CREATE TABLE statement to always have an up-to-date value:

CREATE TABLE TestTable(
    id INT AUTO_INCREMENT PRIMARY KEY,
    col1 INT NOT NULL,
    col2 INT NOT NULL,
    col3 INT AS (col1 - col2)
);


The column can be virtual or stored (virtual is default) and each has their own use cases as detailed in the link above. 

Note: only applicable for MySQL 5.7.6 &amp; higher.