The syntax for creating a new database in MongoDB is:

use

For example, to create a new database called “mydatabase”:

use mydatabase

Leave a Reply

Your email address will not be published. Required fields are marked *