loonyuni
loonyuni

Reputation: 1473

SELECT * FROM table WHERE "substring" IN table_field?

id | url
---------
1  | "facebook.com/user"
2  | "stackoverflow.com/question/"
3  | "facebook.com/videos"

So basically I want to extract rows 1 and 2 if I were to try and find urls that have "facebook" in them.

And I'm not sure how to query for that, please help.

Thank you.

Upvotes: 2

Views: 413

Answers (1)

Thomas G
Thomas G

Reputation: 10206

Use LIKE operator

SELECT * FROM table WHERE url LIKE '%facebook%'

Upvotes: 7

Related Questions