title: How to aggregate unrelated tables with temporary column
body: <p>Here's a tough cookie. I have two unrelated tables - <strong>vegetable</strong> and <strong>fruit</strong>. I wonder if it's possible to do all the following steps in one MySQL query:</p>
  
  <p>1) <code>SELECT</code> <strong>id</strong> and <strong>name</strong> from both tables.</p>
  
  <p>2) Append temporary column value - <strong>tmp_type</strong> - to each row found in (1). Type of vegetable = 1, fruit = 2.</p>
  
  <p>3) Aggregate results from both tables and <code>ORDER BY</code> <strong>name</strong>.</p>
  
  <p>So, something like this:</p>
  
  <p><img src="https://i.stack.imgur.com/g2Y5b.png" alt="enter image description here"></p>
  
  <p>Any ideas? I really would like to do it on the database level instead of manipulating two table results in PHP controller, but  I'm not sure what's the best way to achieve the goal.</p>