【问题标题】:Import null values in MongoDB Compass在 MongoDB Compass 中导入空值
【发布时间】:2019-05-27 16:05:37
【问题描述】:

我在 MongoDB Compass 中使用 csv 导入数据,但某些值必须为空。在 MySQL Workbench 中,我们使用 '\N' 导入空值,对于 MongoDB,我应该使用什么?

【问题讨论】:

    标签: mongodb csv mongodb-query mongodb-compass


    【解决方案1】:

    你可以在 mongo 中插入 null。

    请注意,这与根本不插入字段不同。 请参阅下面有关“null”和不存在的文档:https://docs.mongodb.com/manual/tutorial/query-for-null-fields/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-02-17
      • 2022-11-09
      • 1970-01-01
      • 2019-01-22
      • 2011-06-23
      • 2014-05-23
      • 1970-01-01
      • 2021-07-23
      相关资源
      最近更新 更多