0 votes
in MongoDB by
Which statement MongoDB query is equivalent to the following SQL query:

UPDATE users SET status = "C" WHERE age > 25

A

db.users.update(

   { age: { $gt: 25 } },

   { status: "C" })

B

db.users.update(

 { age: { $gt: 25 } },

 { $set: { status: "C" } })

C

db.users.update(

 { age: { $gt: 25 } },

 { $set: { status: "C" } },

 { multi: true })

D

db.users.update(

 { age: { $gt: 25 } },

 { status: "C" },

 { multi: true })

1 Answer

0 votes
by

Ans is 

C

db.users.update(

 { age: { $gt: 25 } },

 { $set: { status: "C" } },

 { multi: true })

...