PDA

View Full Version : how to copy one field in mysql


yahoooh
09-21-2007, 08:31 AM
hello

i need the query code to :
copy one field from one table to another

i have table name : article with field name @categoryid@
i need to transfer this field with all data to another table named vbarticle

any help

Dismounted
09-21-2007, 09:24 AM
Do you want to move the whole table, or just move all category ids over? You've written "transfer this field with all data" so I'm a bit confused.

yahoooh
09-21-2007, 09:52 AM
only @transfer this field with all data@
to another table which already created

Eikinskjaldi
09-21-2007, 01:49 PM
are the @signs supposed to help us in someway?

Is there a key field? I assuem there must be

update recieve_table, donate_table, set receive_table.receivefield=donate_table.donate_fie ld where receive_table.key = donate_table.key