db.getName() in mongoDB

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

db.getName()

Output

test


No comments:

Post a Comment