select cust_id,cust_name, CONCAT(upper(left(cust_name,2)),upper(left(cust_city,3))) as user_login from Customers mysql 字符串的拼接concat(str1,str2),其中登录名全部为大写字母,用到upper(),又因为"并由顾客联系人的前两个字符(cust_contact)“和”其所在城市的前三个字符(cust_city)组成“,"所以需要用到left(str,lengh),组合在一起就是:concat(upper(left(str,lengh)),upper(left(str,lengh)))