SELECT only rows that contain only alphanumeric characters in MySQL July 13, 2023 by Tarik Try this code: SELECT * FROM table WHERE column REGEXP '^[A-Za-z0-9]+$' This makes sure that all characters match.