Sush
Sush

Reputation: 1457

Delete data from a collection in mongo db by using multiple conditions

I am new to mongo db using i have to delete data from a table like

select from table where id=12 and browser =GC

But I dont know how to perform this in mongo db?

Upvotes: 5

Views: 15345

Answers (1)

DhruvPathak
DhruvPathak

Reputation: 43235

Use remove

db.collectionName.remove({'_id':12,'browser':"GC"})

Can provide more accurate answer if you show your collection and documents .

Upvotes: 15

Related Questions