閱讀45 返回首頁    go 阿裏雲 go 技術社區[雲棲]


關於mongodb按照字段模煳查詢方法


關於mongodb按照字段模煳查詢方法

 

模煳查詢:tname包含某個關鍵字測試'

cd /opt/soft/mongodb/bin

./mongo --host 192.168.0.1  --port 17017  test

db.test_info.find({"tname": {$regex: '測試', $options:'i'}}) 

db.test_info.find({"tname": {$regex:/測試.*/i}}) 

最後更新:2017-04-03 12:55:32

  上一篇:go 準備將博客從CSDN搬家http://www.fenesky.com
  下一篇:go 2011藍橋杯【初賽試題】中獎計算