Articles → MONGODB → Comparison Operators In MongoDB

Comparison Operators In MongoDB






Comparison Operators




  1. $eq → checks if the values you are comparing are equal
  2. $ne → checks if the values you are comparing are not equal
  3. $lt → checks if the value 1 is less than value 2
  4. $gt → checks if the value 1 is greater than value 2
  5. $lte → checks if the value 1 is less than or equal to value 2
  6. $gte → checks if the value 1 is greater than or equal to value 2

Example


Picture showing how the eq comparison operator works in mongodb





Posted By  -  Karan Gupta
 
Posted On  -  Tuesday, January 2, 2024

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250