1、
var result = db.foo.aggregate(...);
db.bar.insert(result.result);
2、
var temp1 = db.mtb1.find(name:"joe");
while(temp1.hasNext()) db.tab2.insert(temp1.next());
相当于sql中:create table tab2 as select * from mtb1 where name=‘joe‘;
原文地址:https://www.cnblogs.com/xibuhaohao/p/12059135.html
时间: 2024-11-05 20:37:36