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

对过长的昵称截取处理

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

全部评论

相关推荐

xxxxOxo:这公司幽默得很,要了简历半天一点动静都没有,过一会就给你发个邮件让你做测试,做完又没后文了,纯溜人
点赞 评论 收藏
分享
头发暂时没有的KFC总裁:找廉价劳动力罢了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务