Gossamer Forum
Home : General : Databases and SQL :

Copying from one table to another...

Quote Reply
Copying from one table to another...
I've had a poke around MySQL.com, and Google.com to see if there is an option like this in MySQL. Basically, I need to transfer a record from one table, and place it into another table.

I could do this the long way, and grab all the data via a while {} , and then do a long winded INSERT, but I'm hoping there is an easier way to do it. I've never really had need to do this until now....so TBH, I really don't have a clue where to start on Google/MySQL.com Unimpressed

Thanks for any pointers.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Copying from one table to another... In reply to
This should get you on your way:

http://www.mysql.com/...n/INSERT_SELECT.html

- wil
Quote Reply
Re: [Wil] Copying from one table to another... In reply to
Thanks....that got me on the right track Smile

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!