QUICKTIP: IsNumeric() function equivalent in MySQL

Here’s how to select all numeric values in a MySQL field and vice versa. We will use the
REGEXP operator in MySQL and will try to mimic the ISNUMERIC() function of Transact-SQL.

Filter all numerical values in a table field

SELECT * FROM table WHERE col1 REGEXP '^-?[0-9]+$'

Filter all non-numerical values in a table field

SELECT * FROM table WHERE col1 NON REGEXP '^-?[0-9]+$'