--- { "title": "not like", "language": "en" } --- # not like ## description ### syntax 'BOOLEAN not like(VARCHAR str, VARCHAR pattern)' Perform fuzzy matching on the string str, return false if it matches, and return true if it doesn't match. like match/fuzzy match, will be used in combination with % and _. 'a' // Precise matching, the same effect as `=`. '%a' // data ending with a 'a%' // data starting with a '%a%' // data containing a '_a_' // Three digits and the middle letter is a '_a' // Two digits and the ending letter is a 'a_' // Two digits and the initial letter is a ## example ``` // Return data that does not contain a in the k1 string mysql> select k1 from test where k1 not like '%a%'; +-------+ | k1 | +-------+ | b | | bb | +-------+ // Return the data that is not equal to a in the k1 string mysql> select k1 from test where k1 not like 'a'; +-------+ | k1 | +-------+ | bab | | b | +-------+ ``` ## keyword LIKE, NOT, NOT LIKE