MySQL Forums
Forum List  »  Newbie

Query based on pattern
Posted by: Jordan Pritt
Date: July 24, 2017 10:46AM

I am having difficulty finding out if I can query based on a string or string pattern. I would think it could, but I am just not finding a solid answer. What I am trying to do is query results based on a string of either x amount of characters or a column containing 'abc' and whatever else follows after it.

example:

SELECT * FROM table WHERE col1(SELECT col FROM table2 WHERE col2='abc%%%%%');

OR

SELECT * FROM table WHERE col1(SELECT col FROM table2 WHERE col2='%%%%%%%%');


If this can be done please let me know, thanks!

Options: ReplyQuote


Subject
Written By
Posted
Query based on pattern
July 24, 2017 10:46AM


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.