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());
while(temp1.hasNext()) db.tab2.insert(temp1.next());
相当于sql中:create table tab2 as select * from mtb1 where name='joe';