select id, name, phone_number from contacts where phone_number not REGEXP '[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]' and substring(phone_number, 1, 1) <> "0" and ( ( phone_number like "%-%-%" and length(substring_index(phone_number, "-", -1)) = 4 and length(substring_index(phone_number, "-", 1)) = 3 and length(replace(phone_number, "-", "")) = 10 ) or ( length(phone_number) = 10 and phone_number not like "%-%-%" ) )
点赞

相关推荐

牛客网
牛客网在线编程
牛客网题解
牛客企业服务