------解决方案-------------------- select * from tb
where len(col)=11 and left(col,1)=1
------解决方案-------------------- select distinct 字段 from 表名 where 字段 like '1[3,5,8][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]' ------解决方案--------------------
-試試以下:
WITH a1 (phone_no) AS
(
SELECT '王明13889887645' UNION all
SELECT '13823432123李刚'
)
SELECT DISTINCT SUBSTRING(phone_no,CHARINDEX('1',phone_no),11) phone_no
FROM a1