Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想存储时区,但不在 timezoneoffset 数据类型中。我应该使用小数还是浮点数?或者是其他东西?NewFoundland 的时区可以是 GMT -3.5,印度部分地区的时区可以是 +5.5,因此 int 不起作用。
为什么不使用查找表?它看起来像这样:
create table TimeZone ( id int identity primary key, name varchar(50), offset decimal(2,1) )
使用主表中的外键引用。