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

Oracle ÖÐµÄ TO_DATE ºÍ TO_CHAR º¯Êý

oracle ÖÐ TO_DATE º¯ÊýµÄʱ¼ä¸ñʽ£¬ÒÔ 2008-09-10 23:45:56 ΪÀý

¸ñʽ
˵Ã÷
ÏÔʾֵ
±¸×¢

 
Year(Äê):
yy
two digits(Á½Î»Äê)
08
 
yyy
three digits(ÈýλÄê)
008
 
yyyy
four digits(ËÄλÄê)
2008
 
 
Month(ÔÂ):
mm
number(Á½Î»ÔÂ)
09
 
mon
abbreviated(×Ö·û¼¯±íʾ)
9ÔÂ
ÈôÊÇÓ¢ÎÄ°æ, ÔòÏÔʾ sep
month
spelled out(×Ö·û¼¯±íʾ)
9ÔÂ
ÈôÊÇÓ¢ÎÄ°æ, ÔòÏÔʾ september
 
Day(ÈÕ):
dd
number(µ±Ôµڼ¸Ìì)
10
 
ddd
number(µ±ÄêµÚ¼¸Ìì)
254
 
dy
abbreviated(µ±Öܵڼ¸Ìì¼òд)
ÐÇÆÚÈý
ÈôÊÇÓ¢ÎÄ°æ, ÔòÏÔʾ wed
day
spelled out(µ±Öܵڼ¸Ììȫд)
ÐÇÆÚÈý
ÈôÊÇÓ¢ÎÄ°æ, ÔòÏÔʾ wednesday
ddspth
spelled out, ordinal twelfth
tenth
 
 
Hour(ʱ):
hh
two digits(12Сʱ½øÖÆ)
11
 
hh24
two digits(24Сʱ½øÖÆ)
23
 
 
Minute(·Ö):
mi
two digits(60½øÖÆ)
45
 
 
Second(Ãë):
ss
two digits(60½øÖÆ)
56
 
 
ÆäËû:
Q
digit(¼¾¶È)
3
 
WW
digit(µ±ÄêµÚ¼¸ÖÜ)
37
 
W
digit(µ±Ôµڼ¸ÖÜ)
2
 

˵Ã÷£º

12Сʱ¸ñʽÏÂʱ¼ä·¶Î§Îª£º 1:00:00 - 12:59:59(12 СʱÖÆÏ嵀 12:59:59 ¶ÔÓ¦ 24 СʱÖÆÏ嵀 00:59:59)

24Сʱ¸ñʽÏÂʱ¼ä·¶Î§Îª£º 0:00:00 - 23:59:59

           
1. ÈÕÆÚºÍ×Ö·ûת»»º¯ÊýÓ÷¨£¨to_date,to_char£©
select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') as nowTime from dual;   //ÈÕÆÚת»¯Îª×Ö·û´®  
select to_char(sysdate,'yyyy') as nowYear   from dual;   //»ñȡʱ¼äµÄÄê  
select to_char(sysdate,'mm')    as nowMonth from dual;   //»ñȡʱ¼äµÄÔ  
select to_char(sysdate,'dd')    as nowDay    from dual;   //»ñȡʱ¼äµÄÈÕ  
select to_char(sysdate,'hh24') as nowHour   from dual;   //»ñȡʱ¼äµÄʱ  
select to_char(sysdate,'mi')    as nowMinute from dual;   //»ñȡʱ¼äµÄ·Ö  
select


Ïà¹ØÎĵµ£º

Oracle תÒå×Ö·û

Ò»¡¢×¼±¸ÌØÊâÊý¾Ý
create table t_escape(s varchar2(50));
--show define -- define "&" (hex 26)
--show escape -- escape off
set define off
set escape on
insert into t_escape values('string&text');
insert into t_escape values('string\&text');
insert into t_escape values('st ......

Oracle Latch¼°latchì¶Ü

 Ð¡Òý
Oracle RdbmsÊ©ÓÃÁ˸÷ÖÖ²»Í¬ÀàÐ͵ÄËø¶¨»úÖÆ£¬latchµÈÓÚ´ËÖеÄÒ»ÖÖ£¬ÕýÎĽ«¼¯ÖÐÒý¼ûlatch(ãÅ)µÄ¸ÅÄ¶®µÃlatchµÄ¶ÒÏÖ²½Ö貢˵Ã÷»½ÆðlatchĦ²ÁµÄÔµ¹Ê¡£
ʲôÊÇlatch
LatchÊÇÓÃÀ´±£»¤SGAÇøÖй²ÏíÊý¾Ý½á¹¹µÄÒ»ÖÖ´®Ðл¯Ëø¶¨»úÖÆ¡£LatchµÄ¶ÒÏÖÊÇÓë²Ù×÷ϵͳÏà¸ÉµÄ£¬ÓÈÉõºÍÒ»¸ö¹ý³ÌÊDz»ÊÇؽÐèµÈºòÒ»¸ölatch¡¢¼±ÐèµÈº ......

ORACLEµÄÈý¸öÅäÖÃÎļþ½éÉÜ

¸ÅÊö
ÔÚoracle°²×°Ä¿Â¼$HOME/network/adminÏÂ,£¬¾­³£¿´µ½sqlnet.ora tnsnames.ora listener.oraÕâÈý¸öÎļþ£¬³ýÁËtnsnames.ora£¬ÆäËûÁ½¸öÎļþÏêϸµÄÓÃ;ºÜ¶àÈ˶¼²»Ì«Á˽⡣
sqlnet.ora ÓÃÔÚoracle client¶Ë£¬ÓÃÓÚÅäÖÃÁ¬½Ó·þÎñ¶ËoracleµÄÏà¹Ø²ÎÊý.
tnsnames.ora ÓÃÔÚoracle client¶Ë£¬Óû§ÅäÖÃÁ¬½ÓÊý¾Ý¿âµÄ±ðÃû²ÎÊý,¾ÍÏñϵ ......

[ת] ½âÎöoracleµÄROWNUM ×÷Õß: chen_liang

¶ÔÓÚrownumÀ´ËµËüÊÇoracleϵͳ˳Ðò·ÖÅäΪ´Ó²éѯ·µ»ØµÄÐеıàºÅ£¬·µ»ØµÄµÚÒ»ÐзÖÅäµÄÊÇ1£¬µÚ¶þÐÐÊÇ2£¬ÒÀ´ËÀàÍÆ£¬Õâ¸öα×ֶοÉÒÔÓÃÓÚÏÞÖƲéѯ·µ»ØµÄ×ÜÐÐÊý£¬¶øÇÒrownum²»ÄÜÒÔÈκαíµÄÃû³Æ×÷Ϊǰ׺¡£
 ¾ÙÀý˵Ã÷£º
ÀýÈç±í£ºstudent(ѧÉú)±í£¬±í½á¹¹Îª£º
ID¡¡¡¡¡¡    char(6)¡¡¡¡¡¡¡¡¡¡ --ѧºÅ
name¡¡¡¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ