2011年12月8日 星期四

[MongoDB] print one field of all record 列出所有資料裡的某個欄位

MongoDB Shell:

> db.users.find({}, {email:1}).forEach(function(u) {print(u.email)})
Related Posts Plugin for WordPress, Blogger...