Is there a way in MySQL to concatenate text to values using a SELECT statement? (like in Oracle)
For example, in Oracle you can write something like this:
SQL> select 'The Year is '|| year, 'The month is '|| month from time where rownum < 2;
'THEYEARIS'||YEAR
----------------------------------------------------
'THEMONTHIS'||MONTH
-----------------------------------------------------
The Year is 2009
The month is 1
SELECT Concat(vend_name, ' (', vend_country, ')')
FROM vendors
ORDER BY vend_name;
Read this tutorial:
http://www.brainbell.com/tutorials/MySQL/Concatenating_Fields.htm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With