title: How to rename columns in select union queries?
body: <p>Hello I have the following query where I want to select the client from the clients table and the values statuses and currencies from the settings table. I made this query but is not working for the reason that both tables, client's and settings' have a column with the name id.</p>
  
  <pre><code>SELECT *, clients.id as client_id FROM clients_table as clients WHERE clients.id = 163
  UNION SELECT settings.values AS statuses FROM settings_table as settings WHERE settings.options = 'statuses'
  UNION SELECT setting.il_values AS currencies FROM settings_table as setting WHERE setting.options = 'currencies'
  </code></pre>
  
  <p>The error message that I'm getting</p>
  
  <blockquote>
    <p>#1222 - The used SELECT statements have a different number of columns</p>
  </blockquote>
  
  <p>How I can fix it?</p>