ITeye博客

mysql找出包含非ASCII、非中文字符值的记录

bashenmail · 2014-04-09 16:16 · 数据库 · 数据库 · MySQL · Markdown

-- 查询非ASCII编码的数据

SELECT email_id,send_log FROM redm_email_others WHERE NOT HEX(send_log) REGEXP '^([0-7][0-9A-F])*$';

 

-- 查询ACSII编码数据

SELECT email_id,send_log  FROM redm_email_others WHERE HEX(send_log) REGEXP '^([0-7][0-9A-F])*$';

 

-- 查询非中文编码数据

SELECT email_id,send_log FROM redm_email_others WHERE NOT HEX(send_log) REGEXP 'e[4-9][0-9A-F]{4}';

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。