1.分割函数:SUBSTRING_INDEX('浙江温州-中国电信','-','1')
2.用例(筛选'-'前至少4个汉字的数据)
select t.mobile_number_home ,
SUBSTRING_INDEX(t.mobile_number_home,'-',1)
from company t
where LENGTH(SUBSTRING_INDEX(t.mobile_number_home,'-',1)) >= 12
LIMIT 20000
1.分割函数:SUBSTRING_INDEX('浙江温州-中国电信','-','1')
2.用例(筛选'-'前至少4个汉字的数据)
select t.mobile_number_home ,
SUBSTRING_INDEX(t.mobile_number_home,'-',1)
from company t
where LENGTH(SUBSTRING_INDEX(t.mobile_number_home,'-',1)) >= 12
LIMIT 20000