解决方案 »
- oracle11g rac中oracle_sid的问题。
- 移植问题,Oracle的MAX,MIN函数(从DB2到Oracle)
- SQL代码优化求解
- oracle查询语句,不用sum()方法,在java中实现相同id的金额累加
- 安装的oracle 10g Express Edition进不了数据库主页
- 添加外键 发生错误!!!!!
- 各位高手,请问哪儿有ORACLE9i的中文版下,谢谢大家!!
- 我想备分一个数据库,然后导入另一台pc机上。大侠们,送分了要来看啊!!!!
- 解救一个程序员
- 使用SQLDeveloper连接mysql数据库后,无法SQLDeveloper提交、回滚
- 希望得到的一个结果集是List<Map<Object,List<Object>>,能否一个SQL采用分组完成呢?
- 100分求一个数据库查询语句(ORACLE 11g)
select * from tb1
minus
select * from tb1 as of timestamp to_timestamp('2007-05-12 13:22:33', 'YYYY-MM-DD HH24:MI:SS')
--时间自行调整
-- 之前最好 select 一下,使用同样的条件 。
delete tb1
where operdate between to_date('2014-11-26 00:00:00,''yyyy-mm-dd hh24:mi:ss)
and to_date('2014-11-26 23:59:59,''yyyy-mm-dd hh24:mi:ss)
可以delete from xxx t1 where (select count(1) from xxx t2 where t2.operdate>t1.operdate)<100或者如果undo没被覆盖
delete from xxx t1 where t1.rowid not in (select t2.rowid from xxx as of timestamp to_date('2014-11-25 12:00','YYYY-MM-DD HH24:MI') t2)
把时间改成合适的值,会将后来插入的数据删掉
用flashback table xxx to timestamp to_date(xxx,xxx);也行,但是要小心数据丢失
delete from tb1
where rowid in (select rowid from tb1
minus
select rowid from tb1 as of timestamp to_timestamp('2007-05-12 13:22:33', 'YYYY-MM-DD HH24:MI:SS'))
可以考虑从其他相关点进行处理:如操作时间