Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mongodb not in

#all documents whose country field value is not neither Portugal or Spain
query = db.collection.find({
    "country" : { '$nin': [
        'Portugal',
        'Spain']
    }
})
Comment

not in in mongodb

-- Syntax: { field: { $nin: [ <value1>, <value2> ... <valueN> ] } }
db.inventory.find( { quantity: { $nin: [ 5, 15 ] } }, { _id: 0 } )
Comment

PREVIOUS NEXT
Code Example
::  
::  
::  
::  
::  
::  
::  
::  
Javascript ::  
::  
::  
::  
::  
Javascript ::  
::  
::  
::  
Javascript ::  
Javascript ::  
Javascript ::  
::  
::  
::  
::  
Javascript ::  
::  
::  
::  
::  
::  
ADD CONTENT
Topic
Content
Source link
Name
8+5 =