1 00:00:02,160 --> 00:00:07,650 Just as we have unset to drop a field, we also can rename it, 2 00:00:07,950 --> 00:00:15,030 so if we look back into our data, let's say age is something we want to rename to total age. 3 00:00:15,060 --> 00:00:19,190 Well what we could do is we could again update many, 4 00:00:19,320 --> 00:00:26,340 now I will actually just use empty curly braces to select all documents in the collection and then to 5 00:00:26,340 --> 00:00:34,890 rename a field, there is the rename operator. The rename operator takes a document as a value where you 6 00:00:34,890 --> 00:00:37,970 then specify the field name you want to rename, 7 00:00:37,980 --> 00:00:46,360 so in our case here, that is age and then as a string, the new field name, total age. If you now hit enter, 8 00:00:46,380 --> 00:00:50,250 you'll see three modifications were made, 9 00:00:50,550 --> 00:00:53,310 why three if we found four elements? 10 00:00:53,310 --> 00:00:55,640 Well Max never had an age, 11 00:00:55,740 --> 00:01:02,990 so if I now find all users, we see total age for Chris, total age for Anna, total age for Manuel and Max 12 00:01:03,000 --> 00:01:06,730 never had an age field and therefore it was also not renamed, 13 00:01:06,750 --> 00:01:07,920 it was never there 14 00:01:07,950 --> 00:01:11,880 and as you saw, it will then also not be added because what would be the value? 15 00:01:11,870 --> 00:01:15,060 We didn't specify a value, we just renamed it. 16 00:01:15,060 --> 00:01:18,360 If you wanted to add an age field to Max, you would do that with set.