1

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

4

1 回答 1

0

您可以将 null 插入到 mongo 中。

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

于 2019-05-27T19:40:39.077 回答