getName()
This method returns the current database name. This method is also used to check in which database currently we are.
Syntax:
db.getName()
Example
MongoDB
Output
test
No comments:
Post a Comment