今天学习mongodb时,打算用db.user.remove()函数把user中的数据都删了,结果没闪成功,提示:remove needs a query。上网查了一下,是因为没有给remove函数传参数,用db.user.remove({})这样就可以了。

相关文章:

  • 2021-05-18
猜你喜欢
  • 2022-12-23
  • 2021-06-06
  • 2022-02-08
  • 2022-02-08
  • 2021-09-14
  • 2021-03-28
  • 2021-08-21
相关资源
相似解决方案