Oracle 正则表达式:查询、更新

阿里 阅读:703 2021-03-31 13:29:53 评论:0

查询:正则表达式匹配手机号码

select auth_user.sid from auth_user where regexp_like(auth_user.user_pin ,'^1[35678][0-9]{9}');

更新:正则表达式匹配手机号码

update auth_user set auth_user.value2 = '1' where auth_user.sid not in (select auth_user.sid from auth_user where regexp_like(auth_user.user_pin ,'^1[35678][0-9]{9}'))

 

声明

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

关注我们

一个IT知识分享的公众号