SELECT * FROM table WHERE "substring" IN table_field?

loonyuni
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.

Thomas G

Use LIKE operator

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

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Select from Table Where field equals a variable

From Dev

Select from mysql table WHERE field in '$array'?

From Dev

SQL SELECT from table when substring is in a string

From Dev

PHP ("SELECT * FROM Table WHERE ... AND ...")

From Dev

SELECT x FROM table WHERE

From Dev

SELECT * FROM table Where CURDATE()

From Dev

SQLite, select where field 'like' field from another table

From Dev

Select field from table A where subselect from table B = table A field

From Dev

Select from table where column in select from another table in laravel

From Dev

Select from table where column in select from another table in laravel

From Dev

BigQuery: select from regexp_match where field in other table

From Dev

Dynamic table name in where clause using a field from select

From Dev

select multiple columns from another table where field contains array

From Dev

Select all columns from table where one field is duplicated

From Dev

SQL, PHP: when submit plus 1 in table_field specified from dropdown

From Dev

SQL, PHP: when submit plus 1 in table_field specified from dropdown

From Dev

MySQL SELECT Substring of rows that do not exist from other TABLE

From Dev

SELECT from table with Varying IN list in WHERE clause

From Dev

Datetime and SELECT * FROM table WHERE date = TODAY

From Dev

JDBC prepared statement select from table where

From Dev

mysql - select from a table with sum() and where clause

From Dev

how select from table where datetime=date

From Dev

Select table from database where value is X

From Dev

select from table where column = any value

From Dev

Select * from table where = "string with linebreaks"

From Dev

select * from table where name like %O%

From Dev

Select from table where the date is later then today

From Dev

select from table where both id exist

From Dev

SQL performance for select from where result of table

Related Related

  1. 1

    Select from Table Where field equals a variable

  2. 2

    Select from mysql table WHERE field in '$array'?

  3. 3

    SQL SELECT from table when substring is in a string

  4. 4

    PHP ("SELECT * FROM Table WHERE ... AND ...")

  5. 5

    SELECT x FROM table WHERE

  6. 6

    SELECT * FROM table Where CURDATE()

  7. 7

    SQLite, select where field 'like' field from another table

  8. 8

    Select field from table A where subselect from table B = table A field

  9. 9

    Select from table where column in select from another table in laravel

  10. 10

    Select from table where column in select from another table in laravel

  11. 11

    BigQuery: select from regexp_match where field in other table

  12. 12

    Dynamic table name in where clause using a field from select

  13. 13

    select multiple columns from another table where field contains array

  14. 14

    Select all columns from table where one field is duplicated

  15. 15

    SQL, PHP: when submit plus 1 in table_field specified from dropdown

  16. 16

    SQL, PHP: when submit plus 1 in table_field specified from dropdown

  17. 17

    MySQL SELECT Substring of rows that do not exist from other TABLE

  18. 18

    SELECT from table with Varying IN list in WHERE clause

  19. 19

    Datetime and SELECT * FROM table WHERE date = TODAY

  20. 20

    JDBC prepared statement select from table where

  21. 21

    mysql - select from a table with sum() and where clause

  22. 22

    how select from table where datetime=date

  23. 23

    Select table from database where value is X

  24. 24

    select from table where column = any value

  25. 25

    Select * from table where = "string with linebreaks"

  26. 26

    select * from table where name like %O%

  27. 27

    Select from table where the date is later then today

  28. 28

    select from table where both id exist

  29. 29

    SQL performance for select from where result of table

HotTag

Archive