并不是无效,是你的写法有误
正确的写法是:select concat(studentName, ',', sex) as 整合 from student
mysql里字符串的拼接应该使用concat函数,不能直接用加号
concat(str1, str2, ...)
其中str1、str2、... 是要拼接的字符串
比如concat('a','b','c')返回'abc'