Page 1 of 1

Copy Row From One Table To Another

Posted: Mon Feb 07, 2011 5:24 am
by djwk
Hi there,

In effect I would like to "cut and paste" a row from one table to another in my database, both tables have the same structure. I know I could do it by reading all the variables and inserting them into the new table but I'm sure there must be a simpler, more efficient way of acheiving this.

Any help would be greatly appreciated.

Re: Copy Row From One Table To Another

Posted: Tue Feb 08, 2011 3:25 pm
by Jade
You can do a insert select statement. Basically you insert from one table via the selection of another table's values: http://dev.mysql.com/doc/refman/5.0/en/ ... elect.html