Detect if value is number in MySQL

The Solution to Detect if value is number in MySQL is


You can use Regular Expression too... it would be like:

SELECT * FROM myTable WHERE col1 REGEXP '^[0-9]+$';

Reference: http://dev.mysql.com/doc/refman/5.1/en/regexp.html

~ Answered on 2011-12-23 19:20:38


Most Viewed Questions: