Win+R打开CMD,输入mongo

1.use first_mongoDb为建库语句
2.db.first_mongoDb.insert({"name":"first_mongoDB"})为向库中插入一条数据(只有插入数据后,查看数据库的时候,才会显示出这个库)
3.show dbs为查看所有数据库语句

1.db.createCollection('first');——创建collection
2.show collections;—— 查看当前库下的collections

1.db.first.insert({name:'first',age:22})——插入
2.db.first.find();——查询

1.show tables;——查看
2.db.first.drop();——删除

db.first.update({name:'first'},{$set:{name:'my_first'}})——修改

db.help();——查询帮助

参考链接: