title: MySql get one record from two identical tables with a check
body: <p>I want to get same records from two identical tables but with a check.</p>
  
  <p>I have following two tables that are identical : </p>
  
  <p><code>table_1</code></p>
  
  <pre><code>id  | enc   | first_name | last_name | address | city
  1   | 1001  | John       | Doe       | abc     |
  </code></pre>
  
  <p><code>table_2</code></p>
  
  <pre><code>id  | enc   | first_name | last_name | address | city
  1   | 1001  |            | Doe       |         | xyz
  </code></pre>
  
  <p>I want to get record from table_2 but since <code>first_name</code> and <code>address</code> are empty it should the from record <code>table_1</code>
  But again <code>city</code> is empty in <code>table_1</code> so it would get the record from <code>table_2</code></p>
  
  <p>I've tried the union like this :</p>
  
  <pre><code>(SELECT * from `table_1` where `id` = `1) 
  UNION 
  (SELECT * from `table_2` where `id` = `1)
  </code></pre>
  
  <p>But its providing both the records from the table. I want only one record using both the table like this :</p>
  
  <pre><code>id  | enc   | first_name | last_name | address | city
  1   | 1001  | John       | Doe       | abc     | xyz
  </code></pre>