title: MariaDB INSERT value as COLUMN_CREATE (dynamic column)
body: <p>I need insert dynamic column as select from another table.</p>
  
  <p>I tried:</p>
  
  <pre><code>INSERT INTO table (id, photos)
  VALUES
  (12345,COLUMN_CREATE(SELECT file FROM photo WHERE ad_id = 12345));
  </code></pre>
  
  <p>and</p>
  
  <pre><code>INSERT INTO table (id, photos)
  VALUES
  (12345,SELECT COLUMN_CREATE(file) FROM photo WHERE ad_id = 12345));
  </code></pre>
  
  <p>and</p>
  
  <pre><code>INSERT INTO table (id, photos)
  SELECT ad_id, COLUMN_CREATE(file) FROM photo WHERE ad_id = 12345;
  </code></pre>
  
  <p>And MariaDB always returns <strong><em>#1064 - You have an error in your SQL syntax;</em></strong></p>