var mongoCollection = db.getCollection('msg_log');
for (var i = 0; i < 100; i++)
{
var doc = {};
doc["ID"] = i;
doc["Msg"] = "value is "+ i;
mongoCollection.insert(doc);
}
mongodb循环插入数据
最新推荐文章于 2024-09-26 16:23:10 发布