mongodb删除操作

  |   0 评论   |   84 浏览

aaa_ca_corp_info_gk
db.auth("admin","aaa@169.com&")
db.createCollection("aaa_person_info_gk")


db.aaa_person_info_gk.find().pretty()
db.aaa_person_info_gk.remove({})

db.aaa_ca_corp_info_gk.find().pretty()
db.aaa_ca_corp_info_gk.remove( { } )

db.createCollection( aaa_ca_corp_info_gk,
   {
     capped: <boolean>,
     autoIndexId: <boolean>,
     size: <number>,
     max: <number>,
     storageEngine: <document>,
     validator: <document>,
     validationLevel: <string>,
     validationAction: <string>,
     indexOptionDefaults: <document>,
     viewOn: <string>,              // Added in MongoDB 3.4
     pipeline: <pipeline>,          // Added in MongoDB 3.4
     collation: <document>,         // Added in MongoDB 3.4
     writeConcern: <document>
   }
)


标题:mongodb删除操作
作者:SmiteLi
地址:https://smite.site/articles/2019/11/28/1574928174643.html

评论

发表评论