Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
存储时间点,包括年、月、日、小时、分钟、秒和秒的小数部分。
TIMESTAMP
小数存储到 6 个小数位。TIMESTAMP 值需要 8 个存储字节。
尽管 TIMESTAMP 数据类型的可接受日期范围与 DATE 类型相同(从 0001 年到 9999 年),但 TIMESTAMP 日期类型的有用范围是从 1600-02-28 23:59:59 到 7911-01-01 00:00:00。早于或晚于此范围的 TIMESTAMP 的时间部分可能不完整。
将 TIMESTAMP 值转换为 TIMESTAMP WITH TIME ZONE 时,该连接的 time_zone_adjustment 设置用于结果中的时区偏移。也就是说,对于该连接而言,将该值视为 "本地" 值。将 TIMESTAMP WITH TIME ZONE 值转换为 TIMESTAMP 时,将放弃该偏移。
删除 TIMESTAMP 的精度后,与分钟或秒有关的内置函数将生成无意义的结果。
SQL/2008 与 SQL/2008 兼容。
Transact-SQL Adaptive Server Enterprise 为时间戳值使用 DATETIME 类型。