select owner,object_name,created from t1 where object_name like 'DBA_HIST%' and owner='SYS' and created>sysdate select owner,object_name,created from t1 where object_name like 'DBA_HIST%' and owner='SYS' and created>sysdate / owner,object_name,created from t1 where object_name like 'DBA_HIST%' and owner='SYS' and created>sysdate */ owner,object_name,created from t1 where object_name like 'DBA_HIST%' and owner='SYS' and created>sysdate / owner,object_name,created from t1 where object_name like 'DBA_HIST%' and owner='SYS' and created>sysdate
select owner,object_name,created from t1 where object_name like 'DBA_HIST%' and owner='SYS' and created>sysdate select owner,object_name,created from t1 where object_name like 'DBA_HIST%' and owner='SYS' and created>sysdate / owner,object_name,created from t1 where object_name like 'DBA_HIST%' and owner='SYS' and created>sysdate */ owner,object_name,created from t1 where object_name like 'DBA_HIST%' and owner='SYS' and created>sysdate / owner,object_name,created from t1 where object_name like 'DBA_HIST%' and owner='SYS' and created>sysdate
; delete noprompt archivelog until time '(sysdate-7)'; delete noprompt force archivelog until time 'SYSDATE
select log_date,owner,job_name,status,ADDITIONAL_INFO from DBA_SCHEDULER_JOB_LOG where log_date>sysdate log_date,owner,job_name,status,ADDITIONAL_INFO from DBA_SCHEDULER_JOB_RUN_DETAILS where log_date>sysdate
%T.ARC'; crosscheck archivelog all; delete noprompt archivelog all completed before 'sysdate-10'; delete %T.ARC'; crosscheck archivelog all; delete noprompt archivelog all completed before 'sysdate-10'; delete
decode(to_char(completion_time,'HH24'),'23',1,0)) as "h23" from v$archived_log where first_time > trunc(sysdate 1024/1024) as MB ,sum(blocks*block_size)/1024 as KB from v$archived_log where first_time > trunc(sysdate
%T.ARC'; crosscheck archivelog all; delete noprompt archivelog all completed before 'sysdate-10'; delete %T.ARC'; crosscheck archivelog all; delete noprompt archivelog all completed before 'sysdate-10'; delete
crosscheck archivelog all; delete noprompt expired archivelog all; delete noprompt archivelog until time "sysdate
SUSPEND',sysdate -6); insert into test values(1,'RESUME',sysdate-3); insert into test values(2,'SUSPEND',sysdate
SQL>select log_date,owner,job_name,status,ADDITIONAL_INFO from DBA_SCHEDULER_JOB_LOG where log_date>sysdate
insert into tab_part select *from test_tab01 where col>sysdate-10; 最后为了把exchange partiton的一个精髓突出出来和在线重定义区分开了
delete noprompt archivelog until time 'sysdate-7';" echo "delete noprompt force archivelog until time 'SYSDATE
,否则会提示找不到表 显示在前面的结果为最新的操作 将scott用户的test表恢复到10分钟前的数据 flashback select * from scott.test to timestamp sysdate
select sysdate + 10 from dual; SYSDATE+10 ---------- 2010-04-07 SQL> select sysdate - 10 from dual; SYSDATE
SQL> select count(*)from card_new where DRAWDATE>sysdate-10; COUNT(*) ---------- 78174 如此一来就抓住了问题的本质
sorts (disk) 0 rows processed SQL> 范围查询,发现不走反向索引查询 SQL> select * from t where created>= sysdate
:查询出每个雇员的到今天为止的雇佣天数,以及十天前每天雇员的雇佣天数 SELECT empno 雇员编号, ename 雇员姓名, SYSDATE-hiredate 雇佣天数, (SYSDATE 结果有小数点,可以用 TRUNC() 截取小数点 SELECT empno 雇员编号, ename 雇员姓名, TRUNC(SYSDATE-hiredate) 雇佣天数, TRUNC((SYSDATE
sorts (disk) 0 rows processed SQL> 范围查询,发现不走反向索引查询 SQL> select * from t where created>= sysdate
sorts (disk) 0 rows processed SQL> 范围查询,发现不走反向索引查询 SQL> select * from t where created>= sysdate
redo 每天切换次数 select trunc(FIRST_TIME,'dd'),count(1) from v$log_history where trunc(FIRST_TIME,'dd')>sysdate log_history b where b.recid = a.recid+1 and to_char(a.first_time,'yyyy-mm-dd hh24:mi:ss') >=to_char(sysdate