title: Replace one column in a table with a column in a different table and select *
body: <p>Apologies for the somewhat confusing Title, I've been struggling to find an answer to my question, partly because it's hard to concisely describe it in the title line or come up with a good search string for it. Anyhoooo, here's the problem I'm facing:</p>
  
  <p>Short version of the question is:
  How can I write the following (invalid but understandable SQL) in valid SQL understood by Oracle:</p>
  
  <pre><code>select B.REPLACER as COL, A.* except A.COL from A join B on a.COL = B.COL;
  </code></pre>
  
  <p>Here's the long version (if you already know what I want from reading the short version, you don't need to read this :P ):</p>
  
  <p>My (simplified) task is to come up with service that massages a table's data and provide it as a sub-query. The table has a lot of columns (a few dozens or more), and I am stuck with using "select *" rather than explicitly listing out all columns one by one, because new columns may be added  to or removed from the table without me knowing, although my downstream systems will know and adjust accordingly.</p>
  
  <p>Say, this table (let's call it Table A from now on) has a column called "COL", and we need to replace the values in that COL with the value in the REPLACER column of table B where the two COL value matches.</p>
  
  <p>How do I do this? I cannot rename the column because the downstream systems expect "COL"; I cannot do without the "expect A.COL" part because that would cause the sql to be ambiguous.</p>
  
  <p>Appreciate your help, almighty StackOverflow</p>
  
  <p>Ray</p>