TIMEX TIMEX - 2 months ago 5
SQL Question

How do I query "begin with" in MySQL?

SELECT stuff REGEXP 'itunes' as is_itunes;


In this MySQL query, if "stuff" has the word "itunes" in it, it will mark it as itunes.

However, I want to say "begin with". How can I check for "begin with" instead of anywhere in the text?

Answer
SELECT ... WHERE stuff LIKE 'itunes%';