Creating, Updating, and Deleting Documents(Chapter 3 of MongoDB The Definitive Guild)

it2022-05-08  11

"$set" sets the value of a key. If the key does not yet exist, it will be created. This can be handy for updating schema or adding user-defined keys.

  The "$inc" modifier can be used to change the value for an existing key or to create a new key if it does not already exist. 

转载于:https://www.cnblogs.com/zhtf2014/archive/2010/10/01/1839808.html


最新回复(0)