search

Home  >  Q&A  >  body text

java - mongodb中 将A字段等于某值 的记录的 B字段更新为指定值?

用java语言如何实现

PHPzPHPz2946 days ago314

reply all(1)I'll reply

  • 天蓬老师

    天蓬老师2017-04-18 10:27:59

    The official documentation of MongoDB is very complete, please refer to the official manual of the MongoDB Java driver:

    http://mongodb.github.io/mong...

    Update operates as follows:

    collection.updateOne(eq("i", 10), set("i", 110));

    reply
    0
  • Cancelreply