真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

MongoDB中怎么操作集合數(shù)據(jù)

這篇文章給大家介紹MongoDB中怎么操作集合數(shù)據(jù),內(nèi)容非常詳細(xì),感興趣的小伙伴們可以參考借鑒,希望對(duì)大家能有所幫助。

創(chuàng)新互聯(lián)專注于密云網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗(yàn)。 熱誠(chéng)為您提供密云營(yíng)銷型網(wǎng)站建設(shè),密云網(wǎng)站制作、密云網(wǎng)頁(yè)設(shè)計(jì)、密云網(wǎng)站官網(wǎng)定制、小程序設(shè)計(jì)服務(wù),打造密云網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供密云網(wǎng)站排名全網(wǎng)營(yíng)銷落地服務(wù)。

1.查看已有集合

show collections

MongoDB中怎么操作集合數(shù)據(jù)

2.向集合中添加數(shù)據(jù)

db.runoob.insert({

title:'test',

description:'this is description',

by:'suyanzhu',

url:'https://blog.51cto.com/suyanzhu',

tags:['php','java','mongodb'],

likes:100

})

MongoDB中怎么操作集合數(shù)據(jù)

3.查看集合中數(shù)據(jù)信息

db.runoob.find()

MongoDB中怎么操作集合數(shù)據(jù)

4.通過(guò)定義變量存儲(chǔ)數(shù)據(jù)信息,再添加到runoob集合中

document=({

        "title" : "demo",

        "description" : "this is description",

        "by" : "yansuzhu",

        "url" : "https://blog.51cto.com/suyanzhu",

        "tags" : [

                "php",

                "sql",

                "java"

        ],

        "likes" : "100"

})

db.runoob.insert(document)

//或

db.runoob.save(document)

MongoDB中怎么操作集合數(shù)據(jù)

MongoDB中怎么操作集合數(shù)據(jù)

關(guān)于MongoDB中怎么操作集合數(shù)據(jù)就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,可以學(xué)到更多知識(shí)。如果覺(jué)得文章不錯(cuò),可以把它分享出去讓更多的人看到。


網(wǎng)頁(yè)標(biāo)題:MongoDB中怎么操作集合數(shù)據(jù)
文章起源:http://weahome.cn/article/ihepgd.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部