MongoDB 实现 create table tab2 as select
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‘;
温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/SQL/15984.html
- 上一篇:MYSQL中,CAST函数的使用规则
- 下一篇:MySQL数据库修改表名