Is it a good idea to use an integer column for storing US ZIP codes in a database?

前端 未结 11 1867
余生分开走
余生分开走 2020-11-29 00:57

From first glance, it would appear I have two basic choices for storing ZIP codes in a database table:

  1. Text (probably most common), i.e. char(5) o
11条回答
  •  日久生厌
    2020-11-29 01:17

    Unless you have a business requirement to perform mathematical calculations on ZIP code data, there's no point in using an INT. You're over engineering.

    Hope this helps,

    Bill

提交回复
热议问题