01.Oracle 数据库误删除数据怎么恢复

2021-04-12  本文已影响0人  还没想好ONE

数据误删除怎么恢复

SQL操作

select * from 表名 as of timestamp to_timestamp('删除时间点','yyyy-mm-dd hh24:mi:ss');
例如:
select * from student as of timestamp to_timestamp('20210412','yyyy-mm-dd hh24:mi:ss');
select * from student as of timestamp to_timestamp('20210412','yyyy-mm-dd hh24:mi:ss') where id = 1;
insert into 表名 ( select * from 表名  
       as of timestamp to_timestamp('删除时间点','yyyy-mm-dd hh24:mi:ss'  )
 );
例如:
insert into student ( select * from student 
       as of timestamp to_timestamp('20210412','yyyy-mm-dd hh24:mi:ss'  )
 );
insert into student ( select * from student 
       as of timestamp to_timestamp('20210412','yyyy-mm-dd hh24:mi:ss'  )
 ) where id = 1;
上一篇下一篇

猜你喜欢

热点阅读