为什么在Navicat for MySQL里对于汉字的链接无效?

2025-02-28 04:58:29
推荐回答(1个)
回答1:

并不是无效,是你的写法有误

正确的写法是:select concat(studentName, ',', sex) as 整合 from student

mysql里字符串的拼接应该使用concat函数,不能直接用加号

concat(str1, str2, ...)

其中str1、str2、... 是要拼接的字符串

比如concat('a','b','c')返回'abc'