How to concat in MySQL

To concat in MySQL you can use the concat or concat_ws function.

Sample CONCAT

SELECT concat('HELLO','|','WORLD','|','TEST');

output

HELLO|WORLD|TEST

Sample CONCAT_WS

SELECT concat_ws('|','HELLO','WORLD');

output

HELLO|WORLD|TEST

for more informations see DEV.MYSQL: Concat, CONCAT_WS

Please Share us:
Please rate this snippet

One thought on “How to concat in MySQL

Leave a Reply