select cust_id,cust_name,group_concat(left(ucase(cust_contact),2),left(ucase(cust_city),3))as user_login from `Customers` group by cust_id,cust_name, 使用concat函数就不需要补group by。由于这次只拼接两个字段的字符优先选择concat,如果要拼接整列所有数据就用group_concat