题解 | #顾客登录名#

顾客登录名

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

select cust_id,
cust_name,
#upper(concat(left(cust_name,2),left(cust_city,3))) as user_login
upper(concat(substring(cust_name,1,2),substring(cust_city,1,3))) as user_login
from Customers
 拼接concat
字符串相关函数 upper转大写,lower小写
substring 子字符串
left/right返回从左、右开始对应个数字符串
全部评论

相关推荐

面了100年面试不知...:今年白菜这么多,冬天可以狂吃了
点赞 评论 收藏
分享
评论
28
2
分享

创作者周榜

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