84669 人が学習中
152542 人が学習中
20005 人が学習中
5487 人が学習中
7821 人が学習中
359900 人が学習中
3350 人が学習中
180660 人が学習中
48569 人が学習中
18603 人が学習中
40936 人が学習中
1549 人が学習中
1183 人が学習中
32909 人が学習中
collection的名字是foo,我想改成 post 同时,将url改成site,由于collection很多这样的document,不知道怎样进行批量更新,有方法吗?
foo
post
url
site
{ '_id': ObjectId() 'url': '' }
人生最曼妙的风景,竟是内心的淡定与从容!
collection改名db.foo.rename('post');
db.foo.rename('post');
字段改名
db.post.update({$rename:{url:'site'}});
collection改名 db.foo.renameCollection('post')
db.foo.renameCollection('post');
collection改名
db.foo.rename('post');
字段改名
db.post.update({$rename:{url:'site'}});
collection改名
db.foo.renameCollection('post')