📅  最后修改于: 2020-11-29 05:53:44             🧑  作者: Mango
MongoDB运算符以及更高级的运算符用于测试是否相等和不相等。
比较运算符都在WHERE子句中使用,以确定选择哪个记录。这里是比较运算符,你可以在MariaDB的使用的列表:
句法:
Index | Comparison Operator | Description |
---|---|---|
1. | = | equal |
2. | <=> | equal (safe to compare null values) |
3. | <> | not equal |
4. | != | not equal |
5. | > | greater than |
6. | >= | greater than or equal |
7. | < | less than |
8. | <= | less than or equal |
9. | in ( ) | matches a value in a list |
10. | not | negates a condition |
11. | between | within a range (inclusive) |
12. | is null | null value |
13. | is not null | non-null value |
14. | like | pattern matching with % and _ |
15. | exists | condition is met if subquery returns at least one row |