如何使用特定区域的值更新 TIMESTAMP WITH TIME ZONE 列?

How to update TIMESTAMP WITH TIME ZONE columns with value of particular zone?

我的 table 中有一个 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;

我需要使用特定时区的系统时间戳更新所有值。

类似

update TIMEZONE_TEST
set COLUMN_ONE = systimestamp at time zone '<TIMEZONE_NAME of the value>';

提前感谢您的帮助。

我不确定我是否正确回答了你的问题,但我认为应该是这个问题:

UPDATE TIMEZONE_TEST SET 
COLUMN_ONE = FROM_TZ(CAST(SYSTIMESTAMP AS TIMESTAMP), EXTRACT(TIMEZONE_REGION FROM COLUMN_ONE));

要求的答案是

UPDATE TIMEZONE_TEST
SET COLUMN_ONE = SYSTIMESTAMP at time zone EXTRACT(TIMEZONE_REGION FROM COLUMN_ONE);

我修改了@Wernfried给出的答案