List:General Discussion« Previous MessageNext Message »
From:Ben Wiechman Date:November 12 2007 8:46pm
Subject:Simple Query
View as plain text  
I need help writing what is probably a rather simple query.


I have two tables. The first contains several columns, but most importantly
an id column.


The second is has two columns, an id that corresponds with the id in the
first table, and a value.


For every row in the first table I'd like to insert a row into the second
with a set value.


I tried this but it is not working. I'm not very familiar with subqueries as
you can see.


insert into table_2 ( id, value ) values ( (select id from table_1), '1' );


Ben Wiechman



Simple QueryBen Wiechman12 Nov
  • Re: Simple QueryPeter Brawley12 Nov