题解 | #顾客登录名#
顾客登录名
https://www.nowcoder.com/practice/7cbf5e3082954c21a80fc750ce97350f
select cust_id, cust_name, upper(CONCAT (LEFT(cust_name, 2), LEFT(cust_city, 3))) as user_login from Customers
解题思路:
1、截取顾客名称的前两位以及城市的前三位LEFT
2、将截取的字符串进行拼接contact()
3、将最后的字符串进行大写转换upper()


查看14道真题和解析