MySQL concatenation operator

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

    || is the ANSI standard string concatenation operator, supported by most databases (notably not MS SQL Server). MySQL also supports it, but you have to SET sql_mode='PIPES_AS_CONCAT'; or SET sql_mode='ANSI'; first.

提交回复
热议问题