Files
doris/docs/en/sql-reference/sql-functions/string-functions/like/not_like.md
EmmyMiao87 15c5896f41 [Docs] Add like, regexp function documents (#6182)
* [Docs] Add like, regexp function documents

* Reconstruct

* Fix compile error
2021-07-15 13:16:21 +08:00

1.7 KiB

title, language
title language
not like 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