mongodbHow to check the version of MongoDB?
To check the version of MongoDB, you can use the
> db.version() 4.2.3
db.version() returns the version of MongoDB that is currently running.
The parts of the code are:
db: This is the database object that is used to access the database.
version(): This is the method that is used to get the version of MongoDB.
More of Mongodb
- How to select specific fields in MongoDB query?
- How to empty an array in MongoDB?
- How to list MongoDB users?
- How to use triggers in MongoDB?
- How to update an array element in MongoDB?
- How to rename a field in MongoDB?
- How to use MongoDB push?
- How to use unwind in MongoDB?
- How to use transactions in MongoDB?
See more codes...