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

ORACLE º¯Êý¼¯½õ

Ò»¡¢ ³£ÓÃÈÕÆÚÊý¾Ý¸ñʽ
1.Y»òYY»òYYY ÄêµÄ×îºóһ룬Á½Î»»òÈýλ
SQL> Select to_char(sysdate,'Y') from dual;
TO_CHAR(SYSDATE,'Y')
--------------------
7
SQL> Select to_char(sysdate,'YY') from dual;
TO_CHAR(SYSDATE,'YY')
---------------------
07
SQL> Select to_char(sysdate,'YYY') from dual;
TO_CHAR(SYSDATE,'YYY')
----------------------
007
2.Q ¼¾¶È 1¡«3ÔÂΪµÚÒ»¼¾¶È£¬2±íʾµÚ¶þ¼¾¶È¡£
SQL> Select to_char(sysdate,'Q') from dual;
TO_CHAR(SYSDATE,'Q')
--------------------
2
3.MM Ô·ÝÊý
SQL> Select to_char(sysdate,'MM') from dual;
TO_CHAR(SYSDATE,'MM')
---------------------
05
4.RM Ô·ݵÄÂÞÂí±íʾ £¨VÔÚÂÞÂíÊý×ÖÖбíʾ 5£©
SQL> Select to_char(sysdate,'RM') from dual;
TO_CHAR(SYSDATE,'RM')
---------------------
V
5.Month ÓÃ9¸ö×Ö·û³¤¶È±íʾµÄÔ·ÝÃû
SQL> Select to_char(sysdate,'Month') from dual;
TO_CHAR(SYSDATE,'MONTH')
------------------------
5ÔÂ
6.WW µ±ÄêµÚ¼¸ÖÜ £¨2007Äê5ÔÂ29ÈÕΪ2007ÄêµÚ22ÖÜ£©
SQL> Select to_char(sysdate,'WW') from dual;
TO_CHAR(SYSDATE,'WW')
---------------------
22
7.W ±¾Ôµڼ¸ÖÜ £¨2007Äê5ÔÂ29ÈÕΪ5ÔµÚ5ÖÜ£©
SQL> Select to_char(sysdate,'W') from dual;
TO_CHAR(SYSDATE,'W')
--------------------
5
8.DDD µ±ÄêµÚ¼¸Ìì £¨2007Äê5ÔÂ29ÈÕΪ2007ÄêµÚ149Ì죩
SQL> Select to_char(sysdate,'DDD') from dual;
TO_CHAR(SYSDATE,'DDD')
----------------------
149
9. DD µ±Ôµڼ¸Ìì
SQL> Select to_char(sysdate,'DD') from dual;
TO_CHAR(SYSDATE,'DD')
---------------------
29
10.D ÖÜÄÚµÚ¼¸Ìì
SQL> Select to_char(sysdate,'D') from dual;
TO_CHAR(SYSDATE,'D')
--------------------
3
11.DY ÖÐÎĵÄÐÇÆÚ¼¸ £¨ £¨2007Äê5ÔÂ29ÈÕΪÐÇÆÚ¶þ£©£©
SQL> Select to_char(sysdate,'DY') from dual;
TO_CHAR(SYSDATE,'DY')
---------------------
ÐÇÆÚ¶þ
12.HH»òHH12 12½øÖÆСʱÊý £¨16£º09·ÖΪÓÃ12СʱÖƼÆʱΪ4µã£©
SQL> Select to_char(sysdate,'HH') from dual;
TO_CHAR(SYSDATE,'HH')
---------------------
04
13.HH24 24СʱÖÆ
SQL> Select to_char(sysdate,'HH24') from dual;
TO_CHAR(SYSDATE,'HH24')
-----------------------


Ïà¹ØÎĵµ£º

oracle ±í¿Õ¼ä²Ù×÷

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

Oracle 10G Êý¾Ý¿âÎļþĿ¼½á¹¹

Oracle 10G Êý¾Ý¿âÎļþĿ¼½á¹¹ 
ÔÚOracle Database 10gÖÐ,OracleµÄĿ¼½á¹¹ÊÇÓÉOracle_Base¼°Æä×ÓĿ¼Oracle_Home¡¢admin¡¢flash_recovery_areaºÍoradataĿ¼¹¹³ÉµÄ¡£Îª·½±ãÌÖÂÛ£¬ÓÃOracle_Base´ú±íOracleĿ¼Ê÷µÄ¸ù£¬ÓÃOracle_Home±íʾ¸ùĿ¼ÏµÄÖ÷Ŀ¼¡£
1.Oracle_BaseĿ¼
Oracle_Base´ú±íOracleĿ¼Ê÷µÄ¸ù¡£ ......

SQLÓÅ»¯¹ý³ÌÖг£¼ûOracle HINTµÄÓ÷¨

 ÔÚSQLÓï¾äÓÅ»¯¹ý³ÌÖУ¬ÎÒÃǾ­³£»áÓõ½hint,ÏÖ×ܽáÒ»ÏÂÔÚSQLÓÅ»¯¹ý³ÌÖг£¼ûOracle HINTµÄÓ÷¨£º
1. /*+ALL_ROWS*/
±íÃ÷¶ÔÓï¾ä¿éÑ¡Ôñ»ùÓÚ¿ªÏúµÄÓÅ»¯·½·¨,²¢»ñµÃ×î¼ÑÍÌÍÂÁ¿,ʹ×ÊÔ´ÏûºÄ×îС»¯.
ÀýÈç:
SELECT /*+ALL+_ROWS*/ EMP_NO,EMP_NAM,DAT_IN from BSEMPMS WHERE EMP_NO='SCOTT';
2. /*+FIRST_ROWS*/
±í ......

dzÎöOracle¼àÌýÆ÷°²×°ÓëÅäÖÃ

2009-04-22 22:00
À´Ô´£ºÖйú
IT
ʵÑé
ÊÒ ×÷ÕߣºØýÃû
 
Oracle
¿Í
Ȥ
¶ËÓë·þ
Îñ
Æ÷¶ËµÄ
Á¬
½ÓÊÇͨ
¹ý
¿Í
Ȥ
¶Ë
·¢
³ö
Á¬
½Ó
Çë
Çó£¬ÓÉ·þ
Îñ
Æ÷¶Ë
¼à
ÌýÆ÷
¶Ô
¿Í
Ȥ
¶Ë
Á¬
½Ó
Çë
Çó
½ø
ÐкϷ¨
¼ì²é
£¬Èç¹û
Á¬
½Ó
Çë
ÇóÓÐЧ£¬
Ôò½ø
ÐÐ
Á¬
½Ó£¬·ñ
Ôò
¾Ü
¾ø¸ÃÁ¬
½Ó¡£ ......

OracleÖÐÅúÁ¿µ¼³öSequence

 Ê¹ÓÃexp¹¤¾ß£¬ÒÔtablesµÄÀàÐ͵¼³öij¸öÓû§ÏÂËùÓеıíºÍÊý¾Ý£¬·¢ÏÖÆäÖÐsequenceûÓб»µ¼³ö¡£ÍøÉÏËÑË÷Ö®£¬·¢ÏÖtoadòËÆÓд˹¦ÄÜ£¬ÓÚÊÇ°²×°ÁË9.6.1.1°æ±¾£¬½á¹û¾ÓȻû·¢Ïִ˹¦ÄÜ¡££¨¿ÉÄÜÊÇÎÒûÕÒµ½£¬ÖÁÉÙºÍÄÇλÀÏ´óµÄ½Øͼ²»Í¬£©£¬×îºóÕÒµ½ÈçϽű¾£¬¿ÉÒÔ½«Ä³¸öÓû§µÄÈ«²¿sequence²éѯ³öÀ´£¬²¢Æ´³É´´½¨Óï¾ä¡£
´úÂëÈçÏ£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ