标签:val arc ble sel 匹配 insert oracle char exp
按照要求匹配出符合中国大陆手机号规则的数据
--1 表准备
create table test_regexp
(
object varchar2(50)
);
--2 数据准备
insert into test_regexp (OBJECT)
values (‘18710128107‘);
insert into test_regexp (OBJECT)
values (‘1871012810‘);
insert into test_regexp (OBJECT)
values (‘1871012819h‘);
insert into test_regexp (OBJECT)
values (‘187a0128107‘);
insert into test_regexp (OBJECT)
values (‘12311111111‘);
insert into test_regexp (OBJECT)
values (‘13800000000‘);
insert into test_regexp (OBJECT)
values (‘17011111111‘);
insert into test_regexp (OBJECT)
values (‘15211111111‘);
insert into test_regexp (OBJECT)
values (‘23452124531‘);
--3 SQL
select * from test_regexp where regexp_like(object,‘^1[3578]\d{9}$‘) ;
--4 返回结果
18710128107
13800000000
17011111111
15211111111
标签:val arc ble sel 匹配 insert oracle char exp
原文地址:http://www.cnblogs.com/88893636-xuyang/p/6818169.html