Try this:

select LastName from MyTable where left(LastName,1) >= 'a' and left(LastName,1) < 'f';

How about

Select LastName from sometable where LastName >= 'A' and LastName <'F'

Hth Henrik Hornemann

-----Oprindelig meddelelse-----
Fra: Doug Parker [mailto:[EMAIL PROTECTED] Sendt: 29. december 2003 23:18
Emne: [PHP-DB] Selecting between using letters

How would I create a select statement in MySQL that would return a range of records from the LastName field where the value starts with a designated letter - for example, returning the range where the first letter of LastName is between A and E...

Any help would be greatly appreciated.


-- PHP Database Mailing List ( To unsubscribe, visit:

Reply via email to