MySQL concatenation operator

后端 未结 6 2201
长发绾君心
长发绾君心 2020-11-29 09:54

I don\'t know concatenation operator for MySQL.

I have tried this code for concatenation:

SELECT vend_name || \' (\' || vend_country || \')\'
FROM Ve         


        
6条回答
  •  感动是毒
    2020-11-29 10:41

    You were using ORACLE type of concatenation. MySQL's Should be

     SELECT CONCAT(vend_name, '(', vend_country, ')')
    

    Call the CONCAT() function and separate your values with commas.

提交回复
热议问题