How To Merge Two MySQL fields?

Where to Get and How to Install MySQL Server for Windows?You need to merge two MySQL fields into one new field.

Process is very simple as is:

1. First of all, always backup your database before proceeding

2. You have need to merge two database fields like field1 and field2 into new field like fieldnew. All fields are located in table named widgets

UPDATE widgets SET fieldnew = CONCAT(field1, ' ', field2);

It is required to have all database fields same types (like text or varchar)

Don’t forget to drop the redundant fileds (field1 and field2) , or use a view (which is updateable in MySQL)

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Furl
  • Reddit
  • Simpy
  • StumbleUpon
  • Technorati

Leave a Reply

Advertising
Links: