Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ORACLE JOB¼ä¸ôʱ¼ä²Î¿¼

 
¹Ø¼ü×Ö: oracle job ¼ä¸ôʱ¼ä trunc
¼ÙÉèÄãµÄ´æ´¢¹ý³ÌÃûΪPROC_RAIN_JM
ÔÙдһ¸ö´æ´¢¹ý³ÌÃûΪPROC_JOB_RAIN_JM
ÄÚÈÝÊÇ£º
Create Or Replace Procedure PROC_JOB_RAIN_JM   Is   li_jobno         Number;   Begin   DBMS_JOB.SUBMIT(li_jobno,'PROC_RAIN_JM;',SYSDATE,'TRUNC(SYSDATE + 1)');    End;  
Ìá½»jobÓï·¨£º
begin   sys.dbms_job.submit(job => :job,                         what => 'P_CLEAR_PACKBAL;',                         next_date => to_date('04-08-2008 05:44:09', 'dd-mm-yyyy hh24:mi:ss'),   interval => 'sysdate+ 1/360');   commit;   end;  
£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­
´´½¨JOB
variable jobno number;   begin   dbms_job.submit(:jobno, 'P_CRED_PLAN;',SYSDATE,'SYSDATE+1/2880',TRUE);   commit;  
ÔËÐÐJOB
begin       dbms_job.run(:job1);   end;  
ɾ³ýJOB
begin       dbms_job.remove(:job1);   end;  
DBA_JOBS
£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½
×ֶΣ¨ÁУ©          ÀàÐÍ                 ÃèÊö
JOB                NUMBER          ÈÎÎñµÄΨһ±êʾºÅ
LOG_USER        


Ïà¹ØÎĵµ£º

oracle ±í¿Õ¼ä²Ù×÷

oracle±í¿Õ¼ä²Ù×÷Ïê½â
  1
  2
  3×÷Õߣº   À´Ô´£º    ¸üÐÂÈÕÆÚ£º2006-01-04 
  5
  6 
  7½¨Á¢±í¿Õ¼ä
  8
  9CREATE TABLESPACE data01
 10DATAFILE '/ora ......

oracle ÊÓƵ±Ê¼Ç3(insert¡¢update¡¢delete)

Ò»,INSERT
1.ΪÁ˲»´òÂÒÔ­À´µÄ±íµÄÊý¾Ý,ËùÒÔ±¸·ÝÔ­À´µÄÊý¾Ý.
create table emp2 as select * from emp
create table emp3 as select * from emp
create table dept2 as select * from dept
create table salgrade2 as select * from salgrade
2.²é¿´±íµÄÉè¼ÆÇé¿ö:desc dept2;±íʾ²é¿´±ídept2µÄÉè¼ÆÇé¿ö.
3.²åÈëÊý¾Ýµ ......

ORACLE ROLLUPºÍCUBEµÄʹÓÃ

ROLLUP£¬ÊÇGROUP BY×Ó¾äµÄÒ»ÖÖÀ©Õ¹£¬¿ÉÒÔΪÿ¸ö·Ö×é·µ»ØС¼Æ¼Ç¼ÒÔ¼°ÎªËùÓзÖ×é·µ»Ø×ܼƼǼ¡£
CUBE£¬Ò²ÊÇGROUP BY×Ó¾äµÄÒ»ÖÖÀ©Õ¹£¬¿ÉÒÔ·µ»Øÿһ¸öÁÐ×éºÏµÄС¼Æ¼Ç¼£¬Í¬Ê±ÔÚĩβ¼ÓÉÏ×ܼƼǼ¡£
ÔÚÎÄÕµÄ×îºó¸½ÉÏÁËÏà¹Ø±íºÍ¼Ç¼´´½¨µÄ½Å±¾¡£
1¡¢ÏòROLLUP´«µÝÒ»ÁÐ
SQL> select division_id,sum(salary)
  2  ......

ORACLE GROUPINGº¯ÊýµÄʹÓÃ

GROUPINGº¯Êý¿ÉÒÔ½ÓÊÜÒ»ÁУ¬·µ»Ø0»òÕß1¡£Èç¹ûÁÐֵΪ¿Õ£¬ÄÇôGROUPING()·µ»Ø1£»Èç¹ûÁÐÖµ·Ç¿Õ£¬ÄÇô·µ»Ø0¡£GROUPINGÖ»ÄÜÔÚʹÓÃROLLUP»òCUBEµÄ²éѯÖÐʹÓᣵ±ÐèÒªÔÚ·µ»Ø¿ÕÖµµÄµØ·½ÏÔʾij¸öֵʱ£¬GROUPING()¾Í·Ç³£ÓÐÓá£
¹ØÓÚROLLUPºÍCUBEº¯ÊýµÄʹÓã¬Çë²Î¼ûÎÒµÄÁíһƪÎÄÕ¡£
http://blog.csdn.net/wh62592855/archive/2009/1 ......

oracle ʱ¼ä²î


 //¼ÆËãºÁÃë²î(Á½¸ödateÀàÐ͵ÄÏà¼õΪÌìÊý²î±ð£¬È»ºóת»»ÎªºÁÃë)
select ceil(to_date('209-11-17 13:00:12','yyyy-mm-dd hh24:mi-ss')-to_date(2009-11-18 14:00:12','yyyy-mm-dd hh24:mi-ss') )from dual;
//¼ÆËãÏà²îÔ·Ý
select (EXTRACT(year from to_date('209-11-17','yyyy-mm-dd'))-EXTRACT(year from  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ