MongoDB向集合增加1条或多条数据
发布时间:2023-10-16 15:56:47 所属栏目:系统 来源:
导读:MongoDB向集合添加1条或多条数据
1.查看集合
show collections
2.向指定集合中插入一条文档数据
db.runoob.insertOne({'test':3})
3.向指定集合中插入多条文档数据
db.runoob.inser
1.查看集合
show collections
2.向指定集合中插入一条文档数据
db.runoob.insertOne({'test':3})
3.向指定集合中插入多条文档数据
db.runoob.inser
MongoDB向集合添加1条或多条数据 1.查看集合 show collections 2.向指定集合中插入一条文档数据 db.runoob.insertOne({'test':3}) 3.向指定集合中插入多条文档数据 db.runoob.insertMany(['a':1,'b':2]) (编辑:聊城站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐