mysql是支持正则表达式的。(REGEXP)
下面mysql语句即可查询出card不为身份证号的记录
(18位纯数字,17位纯数字+X,15位纯数字)
select * from table where card not REGEXP '[0-9]{18}|[0-9]{17}X|[0-9]{15}'
mysql是支持正则表达式的。(REGEXP)
下面mysql语句即可查询出card不为身份证号的记录
(18位纯数字,17位纯数字+X,15位纯数字)
select * from table where card not REGEXP '[0-9]{18}|[0-9]{17}X|[0-9]{15}'