1.批量修改
(1)update table2 set xm=(select xm from tb1 where table1.id=table2.id),
xb=(select xb from table1 where table1.id=table2 .id)
where id in(select id from table1);
(2)update table2 set(xm,xb)=(select xm,xb from table1 where table1.id=table2 .id)
where id in(select id from table1);
2.查询2017-12-10 17:00:00这个时间点时的数据
select * from table as of timestamp to_Date('2017-12-10 17:00:00', 'yyyy-mm-dd hh24:mi:ss')
找回某个表5分钟前删除的数据
select * from emp as of timestamp sysdate - 5/1440; --timestamp 后面为时间点
本文介绍了如何在数据库中进行批量数据更新的方法,并提供了两种不同的SQL语法示例。此外,还讲解了如何查询特定时间点的数据及恢复最近被删除的记录。

183

被折叠的 条评论
为什么被折叠?



