select where first letter is a number (mysql)

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
snek_one
Forum Newbie
Posts: 7
Joined: Wed May 21, 2003 9:07 am

select where first letter is a number (mysql)

Post by snek_one »

ok, now I may be an idiot for forgetting how to do this and not being able to find it in the manual or via google, but you would really help me out with this...

how do I do a select where the first letter has to be a numer? i have a list of artists which make electronic music and a couple start with a number.. i've already gotten the entire alphabet working so ppl can view only artists with a certain letter as the first letter, but numbers are something different..

thnx in advance for the help..
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

Not to good at this, but:

Code: Select all

SELECT * FROM table WHERE left(field,1) NOT IN ('1', '2', '3', '4', '5', '6', '7', '8', '9', '0');
Post Reply