with your_data as (
select stack(6,
'1244',
'a888d',
'ahahd',
'我',
'我是',
'19mon'
) as col1
)
select col1 from your_data
where col1 not rlike ('^\\d+$') --not digits only
and col1 not rlike ('^[a-zA-Z]+$') --not alpha only
and length(col1) !=1; --not single char (digit and alpha filtered already)
SELECT *
FROM abc
WHERE LOWER(col1) != UPPER(col1) -- COLLATE Latin1_General_CS_AS SQL Server specific
OR (LENGTH(col1) != 1 AND col1 like '%[^a-zA-Z.0-9]%');
2条答案
按热度按时间xwmevbvl1#
使用正则表达式:
退货:
演示:http://demo.gethue.com/hue/editor?editor=324999
tvmytwxo2#
你可以尝试以下方法:
db<>小提琴演示