Categories

1 Answer

Oct 12, 2019

MongoDB use DATABASE_NAME is used to create database. The command will create a new database if it doesn't exist, otherwise it will return the existing database.

Syntax

Basic syntax of use DATABASE statement is as follows −

use DATABASE_NAME

Select a database :

If you want to use a database with name <myMangoDB>, then use DATABASE statement would be as follows −

>use myMangoDB
switched to db myMangoDB

To check your currently selected database, use the command db

>db
myMangoDB
Click here to read more about Loan/Mortgage
Click here to read more about Insurance

Related questions

Madanswer
Oct 12, 2019 in Big Data | Hadoop
Oct 12, 2019 in Big Data | Hadoop
Oct 12, 2019 in Big Data | Hadoop
...