标签:rto 1.3 show 技术分享 批量 weight class img 变量
show collections
db.createCollection("user")
db.user.insert({name:"zhangsan"})
db.user.dorpCollection()
db.user.insert({name:"zhangsan",age:20,sex:"boy"})
或者先定义变量再保存变量
lisi={name:"lisi",age:30,sex:"girl",phone:"13999999999"}
db.user.insert(lisi)
db.user.save({name:"xiaoli",age:18,sex:"girl"})
或者先定义变量再保存变量
wangwu={name:"wangwu",age:28,sex:"boy",email:"xxx@xx.com"}
db.user.save(wangwu)
db.user.insertOne( obj, <optional params> ) - insert a document, optional parameters are: w, wtimeout, j db.user.insertMany( [objects], <optional params> ) - insert multiple documents, optional parameters are: w, wtimeout, j
db.user.dorp()
标签:rto 1.3 show 技术分享 批量 weight class img 变量
原文地址:https://www.cnblogs.com/yangzhilong/p/9045430.html