title: Does mysql command line have macros?
body: <p>I want to be able to select a custom list of fields with my queries without typing it all each time.</p>
  
  <p>For example, I might want:</p>
  
  <pre><code>select A, A+B, (A div 2) / C, concat_ws(' ', A, B, C, D)
  from my_table where blahblahblah
  </code></pre>
  
  <p>I'm going to replace <code>blahblahblah</code> with many different conditionals but is there a way to just type</p>
  
  <pre><code>select MY_CUSTOM
  from my_table where A &gt; 2 and G is not null;
  </code></pre>
  
  <ol>
  <li><code>select *</code> from a view doesn't work since I still want to query based on fields I don't want to display</li>
  <li><p>I don't really want to do a stored procedure.. where the syntax would be like </p>
  
  <pre><code>do_my_query('where A&gt;2 and G is not null')
  </code></pre></li>
  </ol>