• 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:

    use DATABASE_NAME

    Example

    If you want to create a database with name mydb, then use DATABASE statement would be:

    > use mydb
    switched to db mydb

     To check your currently selected database, use the command db

    > db
    mydb

     If you want to check your databases list, use the command show dbs.

    > show dbs

0 Years in
Operation

Trusted by global clients for a decade of consistent delivery and innovation.

0 Loyal
Clients

Long-term partners who rely on us for intelligent, reliable solutions.

0 Successful
Projects

From complex systems to AI-first applications — every project built to perform.

Words from our clients

 

Tell Us About Your Project

We’ve done lot’s of work, Let’s Check some from here