To rename a collection in MongoDB, you can utilize renameCollection() method. The syntax is as follows
MongoDB Tutorial
- MongoDB Installation
- MongoDB – Mongo Shell
- MongoDB Create Database
- MongoDB Show Databases
- MongoDB Drop Database
- MongoDB Copy Database
- MongoDB Create Collection
- MongoDB Show Collection
- MongoDB Rename Collection
- MongoDB Backup and Restore
- Uninstall MongoDB on Ubuntu in 3 Steps
- MongoDB Too many open files
- Uninstall MongoDB from Ubuntu 20.04 LTS
- Home
- MongoDB Tutorial
- MongoDB Rename Collection