MySQL Concatenate: Adding String At The End Of Field Data

From time to time it is useful to be able to append a string or data to an existing data of a data field by using concat function in MySQL.

For example we want to add site signature at the end of the comments posted by users.

concat(field_name,”string to add”)

Now let us see how it is used in a MySQL table query.

update comments set field_name=concat(field_name,’string to add’) where id=’1′;

VN:F [1.8.5_1061]
Rating: 10.0/10 (1 vote cast)
MySQL Concatenate: Adding String At The End Of Field Data10.0101

Related posts:

  1. MySQL Optimization and Performance Tips
  2. Mysql Data Import
  3. Optimize MySQL for Low Memory Use
  4. Howto: How to Reset the MySQL Root Password
  5. Sun acquires MySQL
  6. Optimize MySQL Performance With MySQLTuner
  7. MySQL search and replace
  8. Compressing mysqldump output – mysql, gzip, bzip2 and LZMA (7z)
  9. Simple RADIUS XML dump PHP script
  10. MySQL 5.0 Release Candidate

Popular Related Items »

Leave a Comment