Reputation: 188
Example Schema:
user
{
name: String,
email: String,
phone: Number
}
"What is the size or length of the field phone with datatype NUMBER"
Upvotes: 2
Views: 1450
Reputation: 311865
Depending on what you set the property to for an initial value, Number
is either a 32-bit integer or a 64-bit float in the MongoDB document.
But storing phone numbers as actual numbers is typically a bad idea. Better to store them as strings to accommodate phone numbers of arbitrary length.
Upvotes: 2