title: dynamic table name in redshift
body: <p>I have a few tables with similar names but different prefixes: us_cities, ca_cities and uk_cities.
  Each one of those tables consist only one column (City_name). I want to union all those tables together and get a result like that:</p>
  
  <pre><code>select 'US' as country, City_name from US_cities
  union all
  select 'CA' as country, City_name from CA_cities
  union all
  select 'UK' as country, City_name from UK_cities
  </code></pre>
  
  <p>In the future I will have more city tables for more countries and I want a dynamic query/view that will identify the relevant tables (*_cities) and add them in the union query. How can I do that in Redshift?</p>