ORACLE DB 的學習者們

2014年1月2日 星期四

快速救回被砍之資料

--砍掉

delete from logmnr.employees where employee_id=12;

commit;

--找回來

select * from logmnr.employees as of timestamp

to_timestamp('2013-12-31 09:30:00', 'YYYY-MM-DD HH:MI:SS') where employee_id=12;

--復原

insert into logmnr.employees

(

select * from logmnr.employees as of timestamp

to_timestamp('2013-12-31 09:30:00', 'YYYY-MM-DD HH:MI:SS') where employee_id=12

);

commit;