开发者

mongodb: how to query a record that doesn't have a column

开发者 https://www.devze.com 2023-02-01 09:25 出处:网络
I want to find out a record that doesn\'t have the \"name\" column, how to do it in mongo console? Thanks开发者_运维技巧.

I want to find out a record that doesn't have the "name" column, how to do it in mongo console?

Thanks开发者_运维技巧. Bin


Should be

 db.things.find( { name : { $exists : false } } ); // return if name is missing
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号