使用remove()删除数据
remove({},function(err,doc){}) // 删除所有数据
remove({age:18},function(err,doc){}); //删除指定条件的数据
User.remove({},function(err,doc){
if(err){
console.log(err);
}else{
console.log(doc);
}
});
User.remove({age:12},function(err,doc){
if(err){
console.log(err);
}else{
console.log(doc);
}
});