-- ascii ( col )
-- 数字:48 - 57
-- 字母:65 - 123
-- 汉字:123+
-- 判断中文
-- 判断首字符
select * from dws_new_role where ascii(game_server) > 123
-- 判断字符串中是否有无中文
select * from dws_new_role where province ~ '[\u2e80-\ua4cf]|[\uf900-\ufaff]|[\ufe30-\ufe4f]'
--hive 正则表达
select bytes_self_province from teg_tencent_meeting_app::pcg_video_table
where
bytes_self_province is not NULL
and regexp_extract(bytes_self_province, '[\u4e00-\u9fa5]+', 0) IS NOT NULL
GROUP BY
bytes_self_province;
-- 判断数字
select * from dws_new_role where ascii(role_id) between 48 and 57
判断字段为中文、英文、数字
Comments 0
Sign in to comment and like
← More postsThat’s all for now. Thanks for reading.
No comments yet.