Integer vs String in database

前端 未结 16 670
后悔当初
后悔当初 2020-12-05 13:42

When defining datatypes in a database, I have always had a problem with choosing whether to use integers or strings to store certain \'numerical\' data.

Say I am bui

16条回答
  •  孤街浪徒
    2020-12-05 14:32

    Somtimes "always" means "for the next month". I wouldn't count on 4 digit codes not going alphanumeric within the lifespan of my responsibility.

    Some dialects of SQL support a dataype that's like NUMBER(4). This works much like a character string, but the alphabet is 0 through 9.

提交回复
热议问题