MongoDB增删改查命令

mongo.exe  --host  -uadmin -padmin
show dbs

use  dbname

show tables;
db.tablename.find()

db.tablename.find({id:101})

db.tablename.save({"id":3,"name":"jimingsong","age":25}) 

db.tablename.remove({id:3})

db.tablename.update({id:3},{$set:{"name":"jms","age":23}})

你可能感兴趣的:(mongodb,CRUD操作)