title: How to 'binarize' a table by SQL
body: <p>For example there is a table Employee:</p>
  
  <pre><code>id gender   age
  --------------------
  1  Male     32
  2  Female   26
  3  Female   45
  4  NA       31
  </code></pre>
  
  <p>I'd like to create another table and insert data like:</p>
  
  <pre><code>id gender_Male gender_Female gender_NA age_26 age_31 age_32 age_45
  --------------------------------------------------------------------
  1  1           0             0         0       0     1      0
  2  0           1             0         1       0     0      0          
  3  0           1             0         0       0     0      1          
  4  0           0             1         0       1     0      0          
  </code></pre>