重命名集合

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

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

相关文章:

  • 2021-07-07
  • 2021-04-25
  • 2021-08-11
  • 2021-05-26
  • 2021-10-13
  • 2022-01-11
猜你喜欢
  • 2022-01-23
  • 2021-11-27
  • 2021-11-30
  • 2021-08-25
  • 2021-09-17
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案