题解 | #顾客登录名#

顾客登录名

https://www.nowcoder.com/practice/7cbf5e3082954c21a80fc750ce97350f

本题要点如下:1.字符串的截取:本题我采用的left函数;2.字符串拼接函数concat;3.小写字母转大写字母UPPER
select cust_id,cust_name,upper(concat(left(cust_contact,2),left(cust_city,3))) user_login
from Customers
关于字符串的截取,常用的几种方式如下:
1、left(str,length) 从左边截取length
2、right(str,length)从右边截取length
3、substring(str,index)当index>0从左边开始截取直到结束 当index<0从右边开始截取直到结束 当index=0返回空
4、substring(str,index,len) 截取str,从index开始,截取len长度
原文链接:https://blog.csdn.net/m0_67393828/article/details/123786650


全部评论

相关推荐

程序员小白条:现在这个简历很没竞争力,而且很多都不要28届的,基本就看运气了,如果没简历包装的话,就海投中小厂吧
点赞 评论 收藏
分享
评论
点赞
3
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务