Reputation: 21
Thank you in advance. I need this for our Thesis that will be Defended on August. Please
Upvotes: 1
Views: 13129
Reputation: 1269763
The right data type for a postal code is a string. In a SQL database, this would typically be VARCHAR()
or CHAR()
, of the appropriate length.
A numeric data type is not appropriate even if the values look like a number. Here is one simple reason: you cannot perform arithmetic on them. In addition, leading zeros are important.
Upvotes: 1