i am try to insert new document in my new collections Video.MovieScrach he has created two different moviesScrach please help me
It is because you made a typing error when you inserted the document.
Collections are created on the fly. So if you did db.MoviesScrach.insert( d ) rather than db.MoviesScratch.insert( d ) you inserted document d into the MoviesScrach collection. It is the normal behavior.
That’s a little strange. Where did you create these collections ?
mongo shell or
That being said, you can drop these collections by clicking on the delete icon in the Compass.
i created this collections Mango compass
You created one with a trailing space "MoviesScrach ".
Connect to Mongo shell and run this command:
You can drop collections by using the db.collection.drop() method.
For a collection with a trailing space, you should use the db.getCollection( "name " ).drop() variant of drop().
See https://docs.mongodb.com/manual/reference/method/db.getCollection/ for more details.
And for Compass