MongoDB common syntax

The following syntax is used in the console. Assume that there are collections (equivalent to relational database libraries) qyxxcx, documents (equivalent to tables) qyxx, jyzcjzs

 

show dbs

use qyxxcx

db

show collections

db.qyxx.drop()

db.qyxx.find()

db.qyxx.findOne()

db.qyxx.find({"Name": "abcd"})

db.qyxx.aggregate([{$lookup:{from: "yjzcjzs",localField:"CORP_NAME",foreignField:"qymc",as:"jzs"}}])

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325950721&siteId=291194637