like

    Perform fuzzy matching on the string str, return true if it matches, and false if it doesn’t match.

    the percent sign (‘%’) represents zero, one, or more characters.

    1. // table test
    2. +-------+
    3. | k1 |
    4. +-------+
    5. | b |
    6. | bab |
    7. | a |
    8. // Return the data containing a in the k1 string
    9. mysql> select k1 from test where k1 like '%a%';
    10. +-------+
    11. | k1 |
    12. +-------+
    13. | bab |
    14. // Return the data equal to a in the k1 string
    15. mysql> select k1 from test where k1 like 'a';
    16. +-------+
    17. | k1 |
    18. +-------+
    19. | a |

    LIKE