SELECT only rows that contain only alphanumeric characters in MySQL

前端 未结 6 1189
天涯浪人
天涯浪人 2020-12-05 01:42

I\'m trying to select all rows that contain only alphanumeric characters in MySQL using:

SELECT * FROM table WHERE column REGEXP \'[A-Za-z0-9]\';
         


        
6条回答
  •  北荒
    北荒 (楼主)
    2020-12-05 02:13

    Try this

    select count(*) from table where cast(col as double) is null;
    

提交回复
热议问题