我试图在集合中使用Robo3T找到所有属性InternalCode为null且不为空的属性
db.getCollection('db1.customer').find({ InternalCode : { $exists: true, $ne: null } })这将返回所有具有该属性并设置为null的文档。
如何处理需要非空值和非空值的场景?
发布于 2020-07-30 12:34:46
不是空的也不是空的,
db.getCollection('db1.customer').find({ InternalCode : { $exists: true, $nin:[null,""] } })https://stackoverflow.com/questions/63172422
复制相似问题