Page 1 of 1

Need query help

Posted: Mon May 10, 2010 6:45 am
by phpashok
Hi friends...

I need a query help...

I wanna get the names from the username field of mysql database which is starting with 'S' (or any letter)...
whats the query for that??
query using LIKE fetches also the names containing 'S' which is not the starting letter of the name...

So please assist me to solve the problem...

Thanks in advance...
Ashok

Re: Need query help

Posted: Mon May 10, 2010 7:24 am
by Eran
use a wildcard only on the right side of 's'

Code: Select all

username LIKE 's%'