title: MySQL: set field default value to other column
body: <p>How to set default value for a field to other column in MySQL?</p>
  <p>I have done it in Oracle with virtual field, but I do not know how to do it in MySQL.</p>
  <p>This is my table:</p>
  <pre><code>CREATE TABLE TSM_TRANSACTION_TBL
  (
    TRANS_ID     INT primary key auto_increment,
    LOCATION_ID  INT,
    TRANS_DATE   DATE,
    RESOURCE_ID  INT,
    TS_ID        INT,
    MAX_VALUE    INT,
    BOOKED_UNITS INT default 0,
    REMAINING    INT default MAX_VALUE - BOOKED_UNITS,
    BOOKED       INT not null,
    USER_ID      INT,
    TRANS_TIME   TIMESTAMP
  );
  </code></pre>