MySQL concatenation operator

后端 未结 6 2190
长发绾君心
长发绾君心 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:43

    Whats good about using concat is that you can pass different data type columns and concat string representations

     SELECT concat('XXX',  10.99, 'YYY', 3, 'ZZZ', now(3)) as a; 
    

    Output

    a
    -----
    XXX10.99YYY3ZZZ2018-09-21 15:20:25.106

提交回复
热议问题