mongodb的delete_大数据技术之MongoDB数据删除
生活随笔
收集整理的這篇文章主要介紹了
mongodb的delete_大数据技术之MongoDB数据删除
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
本篇文章探討了大數據技術之MongoDB數據刪除,希望閱讀本篇文章以后大家有所收獲,幫助大家對相關內容的理解更加深入。
1.查看集合
show collections
2.向集合中添加數據
db.runoob.insertOne(
{
'title':'remove method',
'url':'https://blog.51cto.com/suyanzhu',
'description':'this is my blog'
}
)
db.runoob.insertMany([
{
'title':'data1',
'url':'https://blog.51cto.com/suyanzhu',
'description':'this is data1'
},
{
'title':'data2',
'url':'https://blog.51cto.com/suyanzhu',
'description':'this is data2'
}
])
3.查看數據
db.runoob.find().pretty()
4.刪除單個數據
db.runoob.deleteOne({'title':'remove method'})
5.查看數據
db.runoob.find().pretty()
本文由職坐標整理發布,學習更多的相關知識,請關注職坐標IT知識庫!
總結
以上是生活随笔為你收集整理的mongodb的delete_大数据技术之MongoDB数据删除的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: java 按钮 颜色_改变按钮颜色的ja
- 下一篇: oc 画一个圆弧_UG建模一个蜗杆的方法