Posted by: Pdfprep
Post Date: February 14, 2021
What is the output of following two commands in MongoDB: db. posts. insert({n_id":l}) db.posts.insert({"_id":l})
A . Two documents will be inserted with _id as 1
B . MongoDB will automatically increment the _id of the second document as 2
C . This will throw a duplicate key error
D . It will insert two documents and throw a warning to the user
Answer: C
Leave a Reply