DocumentDB LogoDocumentDB
HomeGitHubDiscordDocsBlogs
Back to DocumentationMQL Documentation
CommandsAggregationQuery And Write
OperatorsAccumulatorAggregationArithmetic ExpressionArray ExpressionArray QueryArray UpdateBitwiseBitwise QueryBitwise UpdateBoolean ExpressionComparison QueryConditional ExpressionData SizeDate ExpressionElement QueryEvaluation QueryField UpdateGeospatialLogical QueryMiscellaneousObject ExpressionProjectionSet ExpressionTimestamp ExpressionVariable ExpressionWindow
Reference/Operators/Logical Query

MongoDB Query Language (MQL) Logical Query Operators

$and

The `$and` operator performs a logical AND operation on an array of expressions and retrieves documents that satisfy all the expressions.

$nor

The `$nor` operator performs a logical NOR operation on an array of expressions and selects documents that fail all the specified expressions.

$not

The `$not` operator performs a logical NOT operation on a specified expression and selects documents that don't match the expression.

$or

The `$or` operator performs a logical OR operation on an array of expressions and retrieves documents that satisfy at least one of the specified conditions.

Copyright © DocumentDB a Series of LF Projects, LLC. For web site terms of use, trademark policy and other project policies please see https://lfprojects.org.