题解 | 电话号码格式校验

电话号码格式校验

https://www.nowcoder.com/practice/2c2453e909c04c29a04c11e9d6b2c769

select id	
,name	
,phone_number
from contacts
where substring(phone_number,1,1) != 0 and (char_length(phone_number) = 10 or phone_number like '___-___-____')

不用正则的办法

全部评论

相关推荐

程序员牛肉:继续沉淀吧同学,你这就是纯纯的流水线产品。 差不多的学历+两个烂大街项目。自身学历又不行,现在找啥实习呢。有点太浮躁了。多花点心思搞搞ai,开源和八股。这比你这段时间捣鼓一段小厂实习要好得多;
点赞 评论 收藏
分享
评论
2
收藏
分享

创作者周榜

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