TIMEX TIMEX - 1 year ago 69
SQL Question

How do I query for fields containing a given text 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 Source
SELECT ... WHERE stuff LIKE 'itunes%';
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download