tags:

views:

279

answers:

2

If this is possible, please provide a sample query or two so I can see how it would work. Both tables will be in the same database.

Thanks!

+12  A: 

Pseudo code:

insert into <target-table>
( <column-list> )
select <columns>
  from <source-table>
Andrew
+1  A: 

INSERT...SELECT is the answer; see http://dev.mysql.com/doc/refman/5.1/en/insert-select.html.

For example:

INSERT INTO names
SELECT last_name, first_name
FROM people
Rob