Jump to content

Adding onto a field in mysql


LanceT

Recommended Posts

I'll assume you're talking about adding a string value to an existing column value. It depends where you want to add the additional data within the existing value (at the beginning, middle somewhere, or at the end).

Here's an example of appending data to an existing field:

UPDATE
          `table_name`
    SET
            `column_name` = CONCAT(`column_name`, 'new data goes here')
WHERE
            ....some condition....
;

See manual page:
http://dev.mysql.com/doc/refman/5.0/en/string-functions.html

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.