MongoDB: db.getName() method
db.getName
The db.getName() method is used to return the name of the current database.
Syntax:
db.getName()
Returns: the current database name.
Example: MongoDB: db.getName() method
The following statement will return the name of the current database.
db.getName();
Output:
db.getName(); test
Retrieve the restaurants data from here
Previous:
db.getMongo() method
Next:
db.getPrevError() method
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework