mysql函数 正则表达式 身份证号 更新 生日 性别 mysql sql,mysql正则表达式
分享于 点击 2689 次 点评:62
mysql函数 正则表达式 身份证号 更新 生日 性别 mysql sql,mysql正则表达式
- mysql正则表达式
SELECT * FROM user WHERE username REGEXP "dlqqt_(pc|app|touch)_([1-9])_mp3_([1-9]+)$";
SELECT * FROM user WHERE username REGEXP "llhb_jhy_icon_([1-9]+)$";
SELECT * FROM user WHERE username REGEXP "(dlqqt_(pc|app|touch)_([1-9])_mp3_([1-9]+)$)|(llhb_jhy_icon_([1-9]+)$)";
- 身份证号 更新 生日 性别
update doctor set sex=(case (convert(substring(idCard,17,1),signed) mod 2) WHEN 1 THEN 1 else 2 end)
,birthday=CONCAT(substring(idCard,7,4),'-',substring(idCard,11,2),'-',substring(idCard,13,2))
where birthday is null or sex=0;
相关文章
- 暂无相关文章
用户点评