Command Prompt Tutorial

Commands (Cont. 3 )


  •  Searching using the findOne()
    We can search for a particular attribute of a document using the findOne().


  • Drop a collection




  • To find the available collections in the current db
- show collections

  This print out the list of collections. We can also show tables


- show db.getCollectionNames()

  This returns the collection names as an array.



Next >