Hello,
can anyone help me please ?
I want to extraxt all rows from a table where some column starts with some given letter. For exampple : Give me all brands from the table brands where the first letter of the brand is an 'a' ?
Many thanks,
Michel
| SitePoint Sponsor |



Hello,
can anyone help me please ?
I want to extraxt all rows from a table where some column starts with some given letter. For exampple : Give me all brands from the table brands where the first letter of the brand is an 'a' ?
Many thanks,
Michel




This might help:
select * from brands where brandname like 'a%'
The % character is a widcard
Mike


you can also do this --
... where left(brand,1) = 'a'


you might want to throw in a LOWER() as well in case you are looking for an "a" or "A". (It might not matter but I believe it is case sensitive).
... where left(LOWER(brand),1) = 'a'



It's working :-)
Thank you very much.
Michel
Bookmarks