본문 바로가기
SQL/MongoDB

MongoDB find array string - 몽고디비 배열 속에 있는 string 찾기

by SSaMKJ 2015. 11. 19.


MongoDB find array string 


몽고디비 배열 속에 있는 string 찾기



db.getCollection('my_collection').find({'images':{'$elemMatch':{'url':/no_image/}}})



my_collection 테이블에 images라는 array field가 있고, 그 안의 url 이란 string에서 no_image 가 포함된 row를 찾는 쿼리.



'SQL > MongoDB' 카테고리의 다른 글

mongo db 배열의 개수 확인하기  (0) 2016.03.28
mongo db group count 방법  (0) 2016.03.22
Java Mongoldb where not in  (0) 2015.11.12
java where like 검색 방법.  (0) 2015.11.12
MongoDB 설정.  (0) 2015.11.09

댓글