之前在做项目的时候不小心把数据库里的数据全部更新成一样的了
后面百度了发现原来可以将数据库里的数据退回到某个时间段
三行代码搞定
--这里的时间点为想要数据恢复到哪个时间段
select * from 表名 as of timestamp to_timestamp('20220202 20:20:20','yyyy-mm-dd hh24:mi:ss');
alter table 表名 enable row movement;
--这里的时间需要和上面的时间一致
flashback table 表名 to timestamp to_timestamp('20220202 20:20:20','yyyy-mm-dd hh24:mi:ss');
(当时用的数据库为Oracle,mysql应该也一样吧)