题解 | 电话号码格式校验
电话号码格式校验
https://www.nowcoder.com/practice/2c2453e909c04c29a04c11e9d6b2c769
SELECT
*
FROM
contacts
WHERE
phone_number REGEXP '^[1-9][0-9]{9}$'
OR phone_number REGEXP '^[1-9][0-9]{2}-[0-9]{3}-[0-9]{4}$'
ORDER BY
id ASC;
