title: Set default value from a query result
body: <p>I have are two tables:</p>
  
  <ol>
  <li><code>menu</code></li>
  </ol>
  
  <pre><code>      id     |     tag  
  ---------------------------    
        1      |      a
        2      |      a
        3      |      b
        4      |      b
  </code></pre>
  
  <ol start="2">
  <li><code>free_menu</code></li>
  </ol>
  
  <pre><code>      id     |   menu_id  
  ---------------------------    
        1      |      3
        2      |      2
        3      |      1
  </code></pre>
  
  <p>I want to make a category column to free_menu table which has same value in menu table, so it can be like below.</p>
  
  <pre><code>      id     |   menu_id   |     tag
  ------------------------------------------  
        1      |      3      |      b
        2      |      2      |      a
        3      |      1      |      a
  </code></pre>
  
  <p>I just want to set a default value for a new column when adding it to the table <code>free_menu</code>, but the following is not working:</p>
  
  <pre><code>ALTER TABLE free_menu
  ADD category VARCHAR(10) NOT NULL
  DEFAULT (SELECT category FROM menu WHERE id = menu_id)
  </code></pre>
  
  <p>Thank you for helping.</p>