String operators
String and numeric operators are used in the comparisons of a where
clause. We have already seen ==
, which is a string equals operator. As we stated earlier, this is a case-sensitive operator, meaning that ABC == ABC
is true but ABC == abc
is false.
Note
You may need to carry out a case-insensitive comparison using =~
. In this case, ABC =~ abc
returns true
. While there are commands to change text to uppercase or lowercase, it is good practice to not do that just for a comparison but rather do a case-insensitive comparison.
Some other string operators that can be used are as follows:
In addition, by placing !
in front of any command, that command is negated. For example, !contains
means does not contain and !in
means not in.
For a complete list of operators, go to https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/datatypes-string-operators.