【发布时间】:2015-02-05 07:12:36
【问题描述】:
我的表中有一个 TIMESTAMP WITH TIME ZONE 列。 我想在各自的时区使用 systimestamp 更新所有值。
我尝试了很多方法,但我无法从值中动态获取时区信息并在单个查询中更新。
我将在这里提供必要的结构。
create table TIMEZONE_TEST
( COLUMN_ONE timestamp with time zone
);
insert into TIMEZONE_TEST values (systimestamp at time zone 'US/Pacific');
insert into TIMEZONE_TEST values (systimestamp at time zone 'Asia/Tokyo');
insert into TIMEZONE_TEST values (systimestamp at time zone 'Asia/Kuala_Lumpur');
insert into TIMEZONE_TEST values (systimestamp at time zone 'Asia/Singapore');
commit;
我需要使用特定时区的 systimestamp 更新所有值。
类似
update TIMEZONE_TEST
set COLUMN_ONE = systimestamp at time zone '<TIMEZONE_NAME of the value>';
提前感谢您的帮助。
【问题讨论】: