mongodb - 命令行增删改查

mongodb - 命令行增删改查
# insert

db.person.insert({ "name": "kelvin", "age": 35 })
db.person.insert({ "name": "huahua", "age": 25 })
db.person.insert({ "name": "xiaomeng", "age": 24 })
db.person.insert({ "name": "laozhang", "age": 32 })


# select

db.person.find()
db.person.count()
db.person.find({ "name": "kelvin" })

# update

db.person.update({ "name": "laozhang" }, { "name": "oldzhang", "age": 33 })


# delete

db.person.remove({ "name": "oldzhang" })
mongodb - 命令行增删改查

mongodb - 命令行增删改查,布布扣,bubuko.com

mongodb - 命令行增删改查

上一篇:利用sqlclr实现数据库服务器端数据加密解密


下一篇:ibatis There is no statement named XXX in this SqlMap