phpmyadmin combine text and column in SET SQL

I’m trying to use the existing values in columns to create a new column using phpmyadmin.

I currently have the following database.

| First_Name | Second_Name    | Full_Name |
| ---------- | -------------- | --------- |
| Paul       | Smith          |           |
| Mike       | Wazowski       |           |


I have first names and second names, but I’m wanting to insert data into full name with some text. I have used this command below to insert data:

UPDATE `users` SET `Full _Name`='some text' + `First_Name`;

However that returns the problem Truncated incorrect DOUBLE value.

>Solution :

That should work:

UPDATE users SET Full_Name = CONCAT(First_Name," ",Second_name)

Leave a Reply