题解 | #顾客登录名#
顾客登录名
https://www.nowcoder.com/practice/7cbf5e3082954c21a80fc750ce97350f
select cust_id,
cust_name,
concat(upper(left(cust_name,2)), upper(left(cust_city,3))) as user_login
from Customers
order by cust_id;
left(string,len):截取字符串从左边开始的len个字符
right(string,len) :截取字符串从右边开始的len个字符
mid(string,start,len):从指定开始的地方开始截取len个字符
substring(string,start,len):和mid用法类似
-------------------------------------------------------------------
concat(A,B):A,B:需要被合并的两个参数,可以为文本字符串,也可以为数字,亦可以是字符,还可以是两个字段。

曼迪匹艾公司福利 121人发布