试了半天,原来通过
db.taobaoItem.find({"coupon_price":{$ne:null}}
?
MongoDB Operators
?
Query Selectors
Comparison
| $all | Matches arrays that contain all elements specified in the query. | 
| $gt | Matches values that are greater than the value specified in the query. | 
| $gte | Matches values that are equal to or greater than the value specified in the query. | 
| $in | Matches any of the values that exist in an array specified in the query. | 
| $lt | Matches values that are less than the value specified in the query. | 
| $lte | Matches values that are less than or equal to the value specified in the query. | 
| $ne | Matches all values that are not equal to the value specified in the query. | 
| $nin | Matches values that do not exist in an array specified to the query. | 
Logical
| $or | Joins query clauses with a logical OR returns all documents that match the conditions of either clause. | 
| $and | Joins query clauses with a logical AND returns all documents that match the conditions of both clauses. | 
| $not | Inverts the effect of a query expression and returns documents that do not match the query expression. | 
| $nor | Joins query clauses with a logical NOR returns all documents that fail to match both clauses. | 
Element
| $exists | Matches documents that have the specified field. | 
| $mod | Performs a modulo operation on the value of a field and selects documents with a specified result. | 
| 
                        
                    
                    
                     
                        免责声明: 本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
                     
                    
                
                
            
            
            
    
        
   
 | 
