Question: Write an update statement to add new fields program and term to all documents in the students collection and set them to values BTD and


 

Write an update statement to add new fields program and term to all documents in the students collection and set them to values "BTD" and 3.

 


 

Write an update statement to modify the value of the program field to "CPA" for all documents in the students collection.

 


 

Write an update statement to modify the value of the program field to "CPD" for the student named Jonie Raby. Before executing an update statement or a delete statement, you can use the find() method with the update or delete criteria, to see how many documents will be affected.

 


 

Write an update statement to increase the value of the term field by 2 for documents with _id 20, 22, and 24.

 


 

Write an update statement to remove the term field from documents that the value of the term filed is 3.

 












Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!