重命名集合

> show collections
tianyc_test9
> db.runCommand({'renameCollection':'Gps.tianyc_test9', 'to':'Gps.tianyc_test99'})
{ "ok" : 1 }
> show collections
tianyc_test99

另:通过db.listCommands(),可以查看到所有mongo的命令。

相关文章: