MCQOPTIONS
Saved Bookmarks
| 1. |
Which of the following query selects documents in the records collection that match the condition { “user_id”: { $lt: 42 } }? |
| A. | db.records.findOne( { “user_id”: { $lt: 42 } }, { “history”: 0 } ) |
| B. | db.records.find( { “user_id”: { $lt: 42 } }, { “history”: 0 } ) |
| C. | db.records.findOne( { “user_id”: { $lt: 42 } }, { “history”: 1 } ) |
| D. | db.records.select( { “user_id”: { $lt: 42 } }, { “history”: 0 } ) |
| Answer» C. db.records.findOne( { “user_id”: { $lt: 42 } }, { “history”: 1 } ) | |