题解 | #顾客登录名#
顾客登录名
https://www.nowcoder.com/practice/7cbf5e3082954c21a80fc750ce97350f
select cust_id,cust_name, #upper(concat(substr(cust_name,1,2),substr(cust_city,1,3))) as user_login upper(concat(left(cust_name,2),left(cust_city,3))) as user_login from Customers
1.MySQL的substr和substring是一样的。都是提取字符串的子字符串https://blog.csdn.net/lanxingbudui/article/details/83782276
2.upper大写,lower小写
3.concat连接字符串https://blog.csdn.net/Ajdidfj/article/details/123246593
4.left取字符串左边几位,right取字符串右边几位