Description
Tasks
- Write an update statement to add new fields program and term to all documents in the students collection and set them to values “CPA” and 1.
|
|
- Write an update statement to modify the value of the program field to “BTM” for all documents in the students
|
|
- Write an update statement to modify the value of the program field to “CPA” 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 the update statement in the box below.
|
|
How many documents are there with the value Jonie Raby for the name field? _______
How many documents were updated? ________
- Write a query to show only the program field for the document that the value of the filed name is Jonie Raby.
|
|
- 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.
|
|

