Overclock.net banner

1 - 3 of 3 Posts

·
Registered
Joined
·
85 Posts
Discussion Starter #1
I have data in one table of my database that I would like to remove and add to another table. Just wondering how I would go about doing this? I heard subqueries are the key - just not sure.


Any help appreciated. Thanks.
 

·
OVERCLOCK IT OR DIE
Joined
·
7,336 Posts

·
Premium Member
Joined
·
7,395 Posts
You can do the stuff in that link, but it's overkill. I think this is what you're after:

insert into target_table (col1, col2, col3)
select col1, col2, col3 from source_table;

Not really a subquery per se, it's just an "insert as select".
 
1 - 3 of 3 Posts
Top