¹ØÓÚoracleµÄС֪ʶ
select trunc(sysdate ,'yyyy') from dual --±¾Äê¶ÈµÚÒ»Ìì
select trunc(sysdate ,'mm') from dual --±¾ÔµÚÒ»Ìì
select trunc(sysdate ,'dd') from dual --µ±Ç°ÈÕÆÚ
dbms_output.put_line( to_char ( ((sysdate)+ ( 10 / ( 24*60*60 )) ) , 'yyyy-mm-dd hh24:mi:ss' ) ) ;--µ±Ç°Ê±¼ä+10s
dbms_output.put_line( to_char ( trunc(sysdate)+( 1 + 1/24 ) , 'yyyy-mm-dd hh24:mi:ss' ) ) ; --µ±Ç° µÚ2Ìì 1µã
dbms_output.put_line( to_char ( trunc(sysdate)+( 1 + 9/24 ) , 'yyyy-mm-dd hh24:mi:ss' ) ) ; --µ±Ç° µÚ2Ìì 9µã
create table tb_old as select * from tb_new where to_date(ci_week,'yyyy-mm-dd')<to_date('2010-02-22','yyyy-mm-dd')
£¨1£© Ñ¡Ôñ×îÓÐЧÂʵıíÃû˳Ðò(Ö»ÔÚ»ùÓÚ¹æÔòµÄÓÅ»¯Æ÷ÖÐÓÐЧ)£ºORACLEµÄ½âÎöÆ÷°´ÕÕ´ÓÓÒµ½×óµÄ˳Ðò´¦Àífrom×Ó¾äÖеıíÃû£¬from×Ó¾äÖÐдÔÚ×îºóµÄ±í(»ù´¡±í driving table)½«±»×îÏÈ´¦Àí£¬ÔÚfrom×Ó¾äÖаüº¬¶à¸ö±íµÄÇé¿öÏÂ,Äã±ØÐëÑ¡Ôñ¼Ç¼ÌõÊý×îÉٵıí×÷Ϊ»ù´¡±í¡£Èç¹ûÓÐ3¸öÒÔÉϵıíÁ¬½Ó²éѯ, ÄǾÍÐèҪѡÔñ½»²æ±í(intersection table)×÷Ϊ»ù´¡±í, ½»²æ±íÊÇÖ¸ÄǸö±»ÆäËû±íËùÒýÓõıí.¡¡¡¡¡¡¡¡¡¡¡¡
£¨2£© WHERE×Ó¾äÖеÄÁ¬½Ó˳Ðò£®£ºORACLE²ÉÓÃ×Ô϶øÉϵÄ˳Ðò½âÎöWHERE×Ó¾ä,¸ù¾ÝÕâ¸öÔÀí,±íÖ®¼äµÄÁ¬½Ó±ØÐëдÔÚÆäËûWHEREÌõ¼þ֮ǰ, ÄÇЩ¿ÉÒÔ¹ýÂ˵ô×î´óÊýÁ¿¼Ç¼µÄÌõ¼þ±ØÐëдÔÚWHERE×Ó¾äµÄĩβ.¡¡
¡¡£¨3£© SELECT×Ó¾äÖбÜÃâʹÓà ‘ * ‘£ºORACLEÔÚ½âÎöµÄ¹ý³ÌÖÐ, »á½«’*’ ÒÀ´Îת»»³ÉËùÓеÄÁÐÃû, Õâ¸ö¹¤×÷ÊÇͨ¹ý²éѯÊý¾Ý×ÖµäÍê³ÉµÄ, ÕâÒâζ׎«ºÄ·Ñ¸ü¶àµÄʱ¼ä¡¡¡¡¡¡¡¡¡¡¡¡
£¨4£© ¼õÉÙ·ÃÎÊÊý¾Ý¿âµÄ´ÎÊý£ºORACLEÔÚÄÚ²¿Ö´ÐÐÁËÐí¶à¹¤×÷: ½âÎöSQLÓï¾ä, ¹ÀËãË÷ÒýµÄÀûÓÃÂÊ, °ó¶¨±äÁ¿ , ¶ÁÊý¾Ý¿éµÈ£»¡¡¡¡¡¡¡¡¡¡¡¡
£¨5£© ÔÚSQL*Plus , SQL*FormsºÍPro*CÖÐÖØÐÂÉèÖÃARRAYSIZE²ÎÊý, ¿ÉÒ
Ïà¹ØÎĵµ£º
´Óoracle8µ½oracle10£¬JDBCĿ¼ÏµÄÇý¶¯°ü¶¼¸÷Óв»Í¬¡£¿´ÁËÒ»ÏÂoracleµÄÎĵµËµÃ÷£¬Á˽âÁËÒ»ÏÂËüÃǵÄÓÃ;£¬ÏàÐÅ´ó¼ÒÓÐʱºòÒ²ºÜÃÔ»ó£¬Ð´³öÀ´¹²Ïíһϡ£
ÕâЩÊÇoracle10gϵÄÇý¶¯°üµÄÃû³ÆºÍËüÃǵÄ×÷Óã¬ÆäËû°æ±¾µÄoracle»ù±¾ÀàËÆ¡£
Ö§³ÖËùÓÐƽ̨µÄJDBC ThinÇý¶¯
classes12.jar (1,417,089 bytes) - JDK 1.2 ºÍ JDK 1.3ÏÂÊ¹Ó ......
1¡¢ÔÚ±¾»ú69ÉÏ´´½¨Êý¾Ý¿âorcl £¬global_name=orcl£¬Ê¹ÓÃÓï¾ä
alter database rename global_name to orcl.us.oracle.com ÐÞ¸ÄÊý¾Ý¿âµÄÈ«¾ÖÊý¾Ý¿âÃûΪorcl.us.oracle.com
2¡¢ÔÚÐé»ú188ÉÏ´´½¨Êý¾Ý¿âviotest£¬global_name=viotest£¬Ê¹ÓÃÓï¾ä
alter database rename global_name to viotest.us.oracle.com ÐÞ¸ÄÊý¾Ý¿âµÄÈ«¾ÖÊ ......
ORACLEÈÕÆÚʱ¼äº¯Êý´óÈ«
TO_DATE¸ñʽ(ÒÔʱ¼ä:2007-11-02 13:45:25ΪÀý)
Year:
yy two digits Á½Î»Äê   ......
ÓÐʱºòÍøÂç·¢Éú±ä¶¯£¬±ØÐëÊÖ¶¯ÐÞ¸ÄÒ»ÏÂRAC VIPµØÖ·£¬²»½öÊǵØÖ·£¬Ò²¿ÉÒÔÐÞ¸ÄVIPËùÔÚµÄÍø¿¨£¬ÔÔòÊÇVIPµØÖ·ÒªºÍPUBµØÖ·ÔÚͬһ¸öÍø¶ÎÄÚ£¬·½·¨ÆäʵÊDZȽϼòµ¥µÄ£¬ÓÐÈËÎʵ½£¬ÎÒ¸øÒ»¸öʾÀýÈçÏ£º
1¡¢¹Ø±ÕÊý¾Ý¿â
srvctl stop database -d db
2¡¢¹Ø±ÕNOTEAPPA
srvctl stop nodeapps -n db2
à ......