Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Mention what is the basic syntax to use index in mongodb?



Mention what is the basic syntax to use index in mongodb?..

Answer / Deepshikha Singh

The basic syntax to create an index in MongoDB is: `db.collection.createIndex( { field1: -1 } `. This creates an ascending index on `field1`.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MongoDB Interview Questions

Mongodb uses bson to represent document structures. True or false?

1 Answers  


Explain the structure of objectid in mongodb.?

1 Answers  


What is the syntax of mongodb collection?

1 Answers  


Write the syntax for creating a collection and dropping a collection in mongodb.

1 Answers  


What is __ v in mongoose?

1 Answers  


Is mongodb good for big data?

1 Answers  


What is a secondary or slave?

1 Answers  


Is mongodb a sql database?

1 Answers  


How to create index after every query insert?

1 Answers  


How to perform transactions/lock in mongodb?

1 Answers  


What is mongoose used for?

1 Answers  


How index is used in mongodb?

1 Answers  


Categories