Articles → MONGODB → $Unset Operator In Mongodb

$Unset Operator In Mongodb






Purpose





Example




Picture showing the sample collection in mongodb




db.Employees.updateMany({}, {$unset:{age:""}})


Picture showing executing the query with $unset operator



Output


Picture showing the output of $unset operator in mongodb



Posted By  -  Karan Gupta
 
Posted On  -  Tuesday, March 19, 2024

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250