title: Adding data of one table into another with some manipulation
body: <p>I just wanted to copy data from one table to another with one manipulation. I can do this with procedure. But I wanted to know if it is can be done by query only.</p>
  
  <pre><code>my source table(city) columns:
  city_id, city_code, city_name, account_code
  
  my destination table(account_city):
  account_city_id, account_id, city_id
  
  account table:
  account_id, account_code
  </code></pre>
  
  <p>Now I want to move city_id from city into account_city table. And account_id should be taken by account_code which is present in city table and need to insert it in account_city table.</p>
  
  <p>Can this be done in mysql query only?</p>