--查看执行sql时间
SELECT sql_text, last_load_time FROM v$sql WHERE last_load_time IS NOT NULL and sql_text like 'select%' ORDER BY last_load_time DESC;
--查看时间前数据
select * from DEMO as of timestamp to_timestamp('2022-04-02 16:26:11','yyyy-mm-dd hh24:mi:ss');
--新建临时表
create table DEMO1 as select * from DEMO as of timestamp to_timestamp('2022-04-02 16:30:11','yyyy-mm-dd hh24:mi:ss');
--俩表关联更新
-- update set 单列字段,更新满足关联条件的所有数据
update T_update01 T1
set infoname=(select T2.infoname from T_update02 T2 where T2.ID=T1.ID)
where exists (select 1 from T_update02 T2 where T2.ID=T1.ID );
-- update set 多列字段,更新满足关联条件的所有数据
update T_update01 T1
set (sys_guid,infoname) = (select T2.sys_guid,T2.infoname from T_update02 T2 where T2.ID=T1.ID)
where exists (select 1 from T_update02 T2 where T2.ID=T1.ID );
oracle 误删恢复教程
最新推荐文章于 2024-08-16 17:02:33 发布