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 })

Related questions

0 votes
asked Jun 17, 2020 in MongoDB by AdilsonLima
0 votes
asked Oct 26, 2020 in MongoDB by AdilsonLima
...