Page 1 of 1

Querying By Leading Letter

Posted: Wed Jun 09, 2004 3:17 pm
by luketheduck
Trying to query a list of names using the leading letter (say A for now) of the surname.

What I've tried is:

Code: Select all

SELECT * FROM player where secondname = 'A%'
But this doesn't work, and no records are returned. What am I doing wrong?

Posted: Wed Jun 09, 2004 3:20 pm
by feyd
SELECT * FROM `player` WHERE `secondname` LIKE 'A%'

Posted: Wed Jun 09, 2004 3:26 pm
by luketheduck
Brilliant, thanks.