Pittrap’s Weblog

Random stuff

MySQL copy one field to another

Posted by Tim on March 9, 2008

If you’re trying to copy the entire contents of one MySQL field into another MySQL field it’s very easy to do.

UPDATE table SET field_a=field_b

table is the name of your table in MySQL
field_a is the field you want to copy to
field_b is the field you want to copy from

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>