题解 | #对过长的昵称截取处理#

对过长的昵称截取处理

https://www.nowcoder.com/practice/69243e2742bf47f1976db836860c123c

select uid, nick_name
from (
    select uid,concat(substr(nick_name,1,10),'...') as nick_name
    from user_info
    where char_length(nick_name)>13
    union 
    select uid,nick_name
    from user_info
    where char_length(nick_name)<=13
) as t
where char_length(nick_name) >10
order by uid

全部评论

相关推荐

收到了小米的实习offer,犹豫是否要去。。。
认真搞学习:雷总还当过首富呢,公司不算大厂算独角兽吗
点赞 评论 收藏
分享
见见123:简历没有啥问题,是这个社会有问题。因为你刚毕业,没有工作经历,现在企业都不要没有工作经历的。社会病了。
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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