Yes you can rename the collection if required but it is not supported on sharded collections.
db.collection.renameCollection()
db.collection.renameCollection();
db.test_my.renamecollection(“test”);
use admin
db.adminCommand( { renameCollection: “mydb.test_my”, to: “mydb.test” } )
No comments:
Post a Comment