title: Choosing Select Columns in Oracle INSERT ALL Statement
body: <p>I am using an <code>INSERT ALL</code> statement in Oracle to insert data into two different tables. The data is coming from a rather complex subquery rather than a <code>VALUES</code> clause.</p>
  
  <p>My issue is that I don't want to insert <strong>all</strong> the columns returned by the subquery into both tables.</p>
  
  <p>As a simple example, suppose I have two tables <code>tab1</code> and <code>tab2</code> each containing three columns <code>col1</code>, <code>col2</code> and <code>col3</code>.</p>
  
  <p>Now suppose  my subquery returns a single row with the values <code>A</code>, <code>B</code> and <code>C</code>.</p>
  
  <p>So, I want <code>A</code>, <code>B</code> and <code>C</code> inserted into <code>col1</code>, <code>col2</code> and <code>col3</code> of <code>tab1</code> respectively, but I want, say, only <code>A</code> and <code>C</code> to go into <code>col1</code> and <code>col3</code> of <code>tab2</code>.</p>
  
  <p>My statement would look something like this:</p>
  
  <pre><code>INSERT ALL
  INTO tab1
    (col1, col2, col3)
  INTO tab2
    (col1, ?, col3)
  FROM
  ( ...
   complex subquery which returns A, B, C
    ...
  )
  </code></pre>
  
  <p>Is there a way I can use some sort of a 'filler' or 'garbage column' to allow me to achieve my objective?</p>