【发布时间】:2022-12-01 18:53:00
【问题描述】:
I am looking a way to find the values in a column that has non alfa numeric values...
I tried select 'kjh$' not RLIKE '([0-9][a-z]|[A-Z])*') but does not work
Thanks for your help
【问题讨论】:
I am looking a way to find the values in a column that has non alfa numeric values...
I tried select 'kjh$' not RLIKE '([0-9][a-z]|[A-Z])*') but does not work
Thanks for your help
【问题讨论】:
You can use REGEXP '^[A-Za-z0-9]+$' or RLIKE '^[A-Za-z0-9]+$'.
Sample SQL -
select * from my table where mycol not RLIKE '^[A-Za-z0-9]+$'
^ - determines start of the string$ - end of the string+ - match the preceding character one or more times[A-Za-z0-9] - to check alphanumeric or not
I ran a simple select statement to show output of above regex.
【讨论】: