SQL 结构化查询语言(Structured Query Language)
管理工具 robo
卸载数据库MongoDB:
-
计算机管理-服务-MongoDB-停止
-
cmd-右键超级管理员-sc delete MongoDB
-
控制面板-卸载软件-MongoDB
安装好以管理员身份
打开
cmd-管理-mongo
命令:
MongoDB Enterprise > db
test
MongoDB Enterprise > show dbs
admin 0.000GB
config 0.000GB
local 0.000GB
MongoDB Enterprise > use admin
switched to db admin
MongoDB Enterprise > db
admin
MongoDB Enterprise > use students
switched to db students
MongoDB Enterprise > db
students
MongoDB Enterprise > db.createCollection('students')
{ "ok" : 1 }
MongoDB Enterprise > show collections
students
MongoDB Enterprise > db.teachers.insert({name:'yft',age:'20'})
WriteResult({ "nInserted" : 1 })
MongoDB Enterprise > show collections
students
teachers
MongoDB Enterprise > db
students
MongoDB Enterprise > show dbs
admin 0.000GB
config 0.000GB
local 0.000GB
students 0.000GB
MongoDB Enterprise > db.students.insert([{name:'张三',age:20},{name:'李四',age:12,sex:'男'}])
2018-10-08T10:16:49.869+0800 E QUERY [js] SyntaxError: illegal character @(shell):1:30
MongoDB Enterprise > db.students.insert([{name:'张三',age:20},{name:'李四',age:12,sex:'男'}]))
BulkWriteResult({
"writeErrors" : [ ],
"writeConcernErrors" : [ ],
"nInserted" : 2,
"nUpserted" : 0,
"nMatched" : 0,
"nModified" : 0,
"nRemove