Oracle闪回查询
发布时间:2020-12-12 14:16:18 所属栏目:百科 来源:网络整理
导读:Oracle数据库有时候不小心删除掉数据,想查询这些数据,或者恢复数据,就可以使用带有as of子句的select语句进行闪回查询。 闪回查询过去某个时间段的数据 select * from tbas of timestamp to_timestamp('2017-11-07 08:50:00','yyyy-mm-dd hh:mi:ss')where
Oracle数据库有时候不小心删除掉数据,想查询这些数据,或者恢复数据,就可以使用带有as of子句的select语句进行闪回查询。
闪回查询过去某个时间段的数据 select * from tb as of timestamp to_timestamp('2017-11-07 08:50:00','yyyy-mm-dd hh:mi:ss') where code = '001'; 闪回恢复 insert into tb( select * from tb as of timestamp to_timestamp('2017-11-07 08:50:00','yyyy-mm-dd hh:mi:ss') where code = '001' ); (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |