Oracle更新错了字段如何恢复,误删数据如何恢复

例如当不小心把车型配置更改成了车型名称
在这里插入图片描述
处理方法:
这时候只需要update更新错的这一个字段就行了:
Update vehicle.v_order t1 set t1.product_con=(select product_con from vehicle.v_order AS OF TIMESTAMP SYSDATE-20/1440 where product_con like ‘S432%’
and t1.id = id)
where product_con=‘思皓X8’
只需要把更新错的字段设置为,20分钟前的该字段的数据就行了。(20是随机的,看你更新错的时间,距离当前时间多久了)

oracle删除错了几行数据,如何恢复。
insert into v_leg
select * from v_leg
as of timestamp to_timestamp(‘2021-01-14 14:20:00’,‘yyyy-mm-dd hh24:mi:ss’)
where vin in (‘LF019722’,‘LF019720’,‘LF019719’,‘LF019718’,‘LF019717’,‘LF019716’)
先查询出来,再插入进去就行了

猜你喜欢

转载自blog.csdn.net/weixin_42258334/article/details/119326530