OracleÖÐto_char()²ÎÊýÏê½â
1 - / , . ; :
"text" ʱ¼ä·Ö¸ô·ûºÅ£¬³ýÁ˱ê×¼µÄ¼¸¸ö£¬»¹ÔÊÐíÓÃÎÄ×Ö×÷Ϊ·Ö¸î·ûºÅ¡£
ÀýÈç to_char(sysdate,'YYYY"Äê"mm"ÔÂ"dd"ÈÕ"')=2008Äê04ÔÂ24ÈÕ
2 AD
A.D. ¼´À¶¡ÎÄAnno DominiµÄ¼òд£¬±íʾ¹«Ôª.»á¸ù¾ÝnlsµÄ²»Í¬×ª»»Îª¹«Ôª»òÕßadµÈ
ÎÞÌØÊâ×¢ÒâÊÂÏî
3 AM
A.M. ÉÏÎçµÄ¼òд ,ͬpm, p.m. £¨ÏÂÎç) , ÖÐÎÄ»·¾³Êä³öΪÉÏÎ磨Èç¹ûÊÇÉÏÎ磩
4 BC
B.C. ËäÈ»±ê×¼µÄд·¨ÊÇB.c. (cСд£© »òÕßBC,ºÃÔÚOracle²»½²¾¿Õâ¸ö¡£±íʾ¹«ÔªÇ°
5 CC
SCC ·µ»ØÊÀ¼Í£¬ÒÔ°¢À²®Êý×Ö±íʾ
Èç¹ûÄêµÄºóÁ½Î»½éÓÚ01-99ÄÇô£¬·µ»ØÇ°Á½Î»+1£¬·ñÔò·µ»ØÇ°Á½Î»
6 D Ò»ÖÜÖ®ÖеÄijÌ죬·µ»ØµÄÊÇÐòºÅ1-7
7 DAY Ò»ÖÜÖ®ÖеÄijÌ죬²»¹ý·µ»ØµÄÊÇÐÇÆÚ¼¸¶øÒÑ£¬ÕâºÍÓïÑÔÉèÖÃÓйØϵ£¬ÔÚÖйú»·¾³ NLS_DATE_LANGUAGE=SIMPLIFIED CHINESE £¬ÓÃÐÇÆÚÒ»µ½ÐÇÆÚÌì±íʾ
8 DD Ô·ÝÖеÄijÌì(1-31)
9 DDD Äê·ÝÖеÄijÌ죨1-366£©
10 DL 'DL' ·µ»Ø³¤µÄÈÕÆÚ¸ñʽ¡£Êܵ½NLS_TERRITORY,NLS_LANGUAGE²ÎÊý¿ØÖÆ¡£Àý 2008Äê4ÔÂ28ÈÕ ÐÇÆÚÒ»
ÏÞÖÆ£º³ýÁËDL£¬ÆäËüʲôµÄ¶¼²»ÄÜÉèÖá£
11 DS ·µ»Ø¶ÌµÄÈÕÆÚ¸ñʽ¡£Êܵ½NLS_TERRITORY,NLS_LANGUAGE²ÎÊý¿ØÖÆ¡£ ÀýÈç 2008-04-28
ÏÞÖÆ£º³ýÁËDL£¬ÆäËüʲôµÄ¶¼²»ÄÜÉèÖá£
12 DY ÈÕÆڵļò³Æ£¬¾ÍÊÇÐÇÆÚ¼¸£¨µ±È»ÕâÖ¸µÄÊÇÖйú»·¾³ÏÂ)
13 E ¼ÍÔª¼ò³Æ£¬µ«ÊÇÖ»ÊʺÏÒÔϼ¯ÖÐÈÕÀú£ºÈÕ±¾»ÊÊÒ£¬ÖлªÃñ¹ú,Ì«¹ý·ðÀú
14 EE ¼ÍԪȫ³Ì£¬ÊʺÏÇé¿öͬE
15 FF [1..9] ¾ÍÊǺÁÃë,Èç¹û²»¸üÉÏÊý×Ö¾ÍÊÇÓÃĬÈϵľ«¶È¡£
Ö»ÄÜÓÃÓÚtimestampÀàÐ͵ġ£
16 FM ÖµµÃ×¢ÒâµÄÒ»¸öº¯Êý£º²»·µ»ØÈκÎÄÚÈÝ¡£
Óе㲻Ã÷°×oracleΪʲôÉèÖÃÕâ¸ö¶«Î÷.
17 FX ͬÉÏ
18 HH ±íʾСʱ£¬Îª12СʱÖÆ£¬Í¬hh12(1-12)
19 HH12 ±íʾСʱ£¬Îª12СʱÖÆ(1-12)
20 HH24 ±íʾСʱ£¬Îª24СʱÖÆ£¨0-23£©
21 IW ISO±ê×¼µÄÐÇÆÚÐòºÅ(1-52,»òÕß1-53£©
22
IYYY
IYY
IY
I
IYY,IY,I, ISOÄê(4룩µÄ4,3£¬2£¬1λÊý×Ö(µ¹Êý£©
to_char(to_date(21120401,'yyyymmdd'),'iyyy, iyy,iy,i')=2112, 112,12,2
23 J ÈåÂÔÈÕ(¶àÓÃÓÚÌìÎĵÄÒ»ÖÖÈÕÀú£©,´Ó¹«ÔªÇ°4712ÄêÒ»ÔÂÒ»ÈÕËãÆ𣬵óöµÄ½á¹ûÊǸöÕûÊý£¬Ëã·¨´óÌåΪ £¨¹«ÔªÈÕÆÚ+4712£©*ÈåÂÔÈÕÀúÄ
Ïà¹ØÎĵµ£º
OracleÁÙʱ±í ÓÅ»¯²éѯËÙ¶È
1¡¢Ç°ÑÔ
Ä¿Ç°ËùÓÐʹÓÃOracle×÷ΪÊý¾Ý¿âÖ§³Åƽ̨µÄÓ¦Ó㬴󲿷ÖÊý¾ÝÁ¿±È½ÏÅÓ´óµÄϵͳ£¬¼´±íµÄÊý¾ÝÁ¿Ò»°ãÇé¿ö϶¼ÊÇÔÚ°ÙÍò¼¶ÒÔÉϵÄÊý¾ÝÁ¿¡£
µ±È»ÔÚOracleÖд´½¨·ÖÇøÊÇÒ»ÖÖ²»´íµÄÑ¡Ôñ£¬µ«Êǵ±Äã·¢ÏÖÄãµÄÓ¦ÓÃÓжàÕűí¹ØÁªµÄʱºò£¬²¢ÇÒÕâЩ±í´ó²¿·Ö¶¼ÊÇ±È½Ï ......
Êʵ±µÄʹÓÃË÷Òý¿ÉÒÔÌá¸ßÊý¾Ý¼ìË÷Ëٶȣ¬¿ÉÒÔ¸ø¾³£ÐèÒª½øÐвéѯµÄ×ֶδ´½¨Ë÷Òý
oracleµÄË÷Òý·ÖΪ5ÖÖ:ΨһË÷Òý£¬×éºÏË÷Òý£¬·´Ïò¼üË÷Òý£¬Î»Í¼Ë÷Òý£¬»ùÓÚº¯ÊýµÄË÷Òý
´´½¨Ë÷ÒýµÄ±ê×¼Óï·¨:
CREATE INDEX Ë÷ÒýÃû ON ±íÃû (ÁÐÃû)
TABLESPACE ±í¿Õ¼äÃû;
´´½¨Î¨Ò»Ë÷Òý:
CREATE unique INDEX Ë÷ÒýÃû ......
oracle 9i/10g°²×°°üºÍPATCHÏÂÔصØÖ·»ã×Ü
°ÑÏÂÃæµÄµØÖ·¸´ÖƵ½Ñ¶À×Àï¾Í¿ÉÒÔÏÂÔØ.
---------------------------------------------------------------------------------------------------
ORACLE 9i
Oracle9i Database Release 2 Enterprise/Standard/Personal Edition for Windows NT/2000/XP
http://download.oracle ......
Îҵݲװ¹ý³Ì
1¡¢±à¼ /etc/apt/sources.list £º
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #±¸·Ý
sudo gedit /etc/apt/sources.list
¼ÓÈëÏÂÃæÕâ¸öÔ´£º
deb http://oss.oracle.com/debian unst ......