Quantcast
Channel: Pario TechnoBlob » Misc
Viewing all articles
Browse latest Browse all 5

Howto combine two columns into one in mysql

$
0
0

This is how you can combine (or concatenate or merge) data from two table columns into one column using a mysql SQL query.

SELECT CONCAT(firstname,lastname) AS 'name' FROM tablename

The result would be “firstname lastname”

If you would like to insert this data into a new column

INSERT INTO tablename (full_name) SELECT CONCAT(firstname,lastname) AS 'name' FROM tablename

Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles





Latest Images