Results 1 to 4 of 4
  1. #1

    How to merge 2 columns in phpmyadmin

    I have 2 columns FIRST_NAME and LAST_NAME in a table. How can i merge the two columns so the FIRST_NAME column will have in every row the last name like "FIRST_NAME {space} LAST_NAME" .

  2. #2
    Join Date
    Jul 2009
    Location
    Indiana
    Posts
    2,193
    UPDATE TABLE_NAME SET NEW_COLUMN = CONCAT(FIRST_NAME, " ", LAST_NAME);
    Sam Barrow - CEO @ SQUIDIX (1-855-SQUIDIX)
    Ask Us About Sponsoring Your Web Site (High Traffic Sites Only)
    Squidix - Shared, Reseller, Semi-Dedicated, Managed VPS and Managed Dedicated Hosting
    Midwestern Web - Web Design & Development Services

  3. #3
    Thank you very much. For anyone interested you must have the new column created before

  4. #4
    remember to also check you column type such as char or int to make sure your data updates correctly or youll be doing it all over again shortly

Similar Threads

  1. CSS Columns - Need some help!
    By dlewis23 in forum Web Design and Content
    Replies: 1
    Last Post: 09-11-2009, 10:32 AM
  2. Mysql to columns
    By raulgonzalez in forum Programming Discussion
    Replies: 8
    Last Post: 10-05-2007, 11:20 AM
  3. Mysql and index columns
    By powerflash2 in forum Programming Discussion
    Replies: 2
    Last Post: 07-17-2007, 03:40 AM
  4. mysql: get max of several columns?
    By bleenzorb in forum Programming Discussion
    Replies: 6
    Last Post: 04-09-2007, 06:15 AM
  5. Question: Are these columns necessary?
    By Gen-T in forum Web Design and Content
    Replies: 44
    Last Post: 09-05-2004, 10:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •