MySQL Forums
Forum List  »  General

Query help!!!! (time sensitive!)
Posted by: Mike H
Date: October 24, 2013 08:15PM

I need to write a query to count the number of rows that contain the word 'pot' in the text column of a table. the text contained in the column are questions, and thats part of the problem. I already know that there are only 3 rows that contain the word pot, but one of them is the last word in the sentance and followed by a question mark. Another one of the rows contains the word "pottery".

how can I write a query that will both ignore the question mark, and also not accept the row that contains the word "pottery"?

SELECT COUNT(*)
FROM Questions
WHERE Text LIKE '% pot %';
(this ignores "pottery" but does not catch "pot?"

how can I do both? PLEASE HELLLPPPP!!!! :)

Options: ReplyQuote


Subject
Written By
Posted
Query help!!!! (time sensitive!)
October 24, 2013 08:15PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.