November 17, 2009
MySQL REGEXP: where first letter is numeric
Category: mysql, Tags: mysql, regexp, khadlock at 11:58 am
Get MySQL results where the first letter is numeric:
SELECT * FROM table WHERE (LEFT(columnname,1) REGEXP '[0-9]')
Or get MySQL results where the first letter is alpha:
SELECT * FROM table WHERE (LEFT(columnname,1) REGEXP '[a-z]')
Leave a Reply
