title: How to define a table of inline values in MySQL?
body: <p>Here is a way of defining <em>inline</em> table data within a SQL query:</p>
  
  <pre><code>SELECT 1 `id`, 'hello' `name`
  UNION ALL
  SELECT 2 `id`, 'goodbye' `name`
  </code></pre>
  
  <p>You can put this into something that expects a query returning the columns <code>id, name</code> and it will work correctly. However, this takes up a lot of unnecessary characters when there are more than one or two rows.</p>
  
  <p><strong>Is there a better way than UNION'ing multiple SELECT's for defining an inline table of values within a MySQL query?</strong></p>