create table 销售表 (产品id int,客户id int,销售日期 timestamp(4));
--timestamp(秒精度)
insert into 销售表 values(100,1058,timestamp '2020-02-14 17:58:45.1234');
--timestamp(秒精度) with time zone
alter table 销售表 modify 销售日期 timestamp(4) with time zone;--指定时区
insert into 销售表 values(101,1059,timestamp '2020-02-14 17:58:45.1234 UTC');
--timestamp(秒精度) with local time zone
alter table 销售表 modify 销售日期 timestamp(4) with local time zone;--系统本地时区
insert into 销售表 values(100,1058,timestamp '2020-02-14 17:58:45.1234 PST');
select current_timestamp from dual;--返回当前时间戳和时区

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-29
  • 2021-09-29
  • 2022-01-18
  • 2022-03-06
  • 2022-02-12
猜你喜欢
  • 2022-02-26
  • 2021-09-29
  • 2022-02-09
  • 2022-01-26
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案