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′;

Related posts:

  1. Mysql Data Import
  2. Optimize MySQL Performance With MySQLTuner
  3. Howto: How to Reset the MySQL Root Password
  4. MySQL Optimization and Performance Tips
  5. Simple RADIUS XML dump PHP script
  6. MySQL: Remove Duplicate Entries
  7. MySQL search and replace
  8. Slow Query Log Analyzes Tools
  9. MDB Tools to export (migrate) from mdb (Microsoft Access format) to MySQL
  10. Optimize MySQL for Low Memory Use

Popular Related Items »

1 Comment »

  1. Macoway Advertising said,

    August 3, 2010 @ 21:23

    Is there a way to write more about this theme here ? We would like to know a lot more about concatenation.

RSS feed for comments on this post · TrackBack URI

Leave a Comment