title: Postgresql subquery fetching multiple rows
body: <p>I have a table (table2) with 2 columns: name and age.
  I have another table (table1) with columns name, age, value, type.</p>
  
  <p>I want to update table1 with adding table2 values and for value=1 and type="abc".</p>
  
  <p>I tried:</p>
  
  <p>Method 1:</p>
  
  <pre><code>insert into table1(select * from table2), 1, 'abc';
  </code></pre>
  
  <p>But getting error at ',' before 1, saying sub queries cannot return more than one column.</p>
  
  <p>Method 2:</p>
  
  <pre><code>CREATE TABLE table2
  (
     name varchar(20),
     age varchar(20)
  );
  
  insert into table2 .... inserted some values
  
  alter table table2 add "value" varchar(10);
  alter table table2 add "name" varchar(20);
  
  update table2 set value=1, name='abc';
  insert into table1 select * from table2;
  </code></pre>
  
  <p>I am using PostgreSQL. Can any one help me how to solve the issue. Method 2 works but that's not the efficient way, I guess.</p>