Oracle INTERVAL DAY TO SECONDÊý¾ÝÀàÐÍ
INTERVAL DAY TO SECONDÊý¾ÝÀàÐÍ
OracleÓï·¨:
INTERVAL '{ integer | integer time_expr | time_expr }'
{ { DAY | HOUR | MINUTE } [ ( leading_precision ) ]
| SECOND [ ( leading_precision [, fractional_seconds_precision ] ) ] }
[ TO { DAY | HOUR | MINUTE | SECOND [ (fractional_seconds_precision) ] } ]
leading_precisionÖµµÄ·¶Î§ÊÇ0µ½9, ĬÈÏÊÇ2. time_exprµÄ¸ñʽΪ:HH[:MI[:SS[.n]]] or MI[:SS[.n]] or SS[.n], n±íʾ΢Ãë.
¸ÃÀàÐÍÓëINTERVAL YEAR TO MONTHÓкܶàÏàËƵĵط½,½¨ÒéÏÈ¿´INTERVAL YEAR TO MONTHÔÙ¿´¸ÃÎÄ.
·¶Î§Öµ:
HOUR: 0 to 23
MINUTE: 0 to 59
SECOND: 0 to 59.999999999
eg:
INTERVAL '4 5:12:10.222' DAY TO SECOND(3)
±íʾ: 4Ìì5Сʱ12·Ö10.222Ãë
INTERVAL '4 5:12' DAY TO MINUTE
±íʾ: 4Ìì5Сʱ12·Ö
INTERVAL '400 5' DAY(3) TO HOUR
±íʾ: 400Ìì5Сʱ, 400Ϊ3Ϊ¾«¶È,ËùÒÔ"DAY(3)", ×¢ÒâĬÈÏֵΪ2.
INTERVAL '400' DAY(3)
±íʾ: 400Ìì
INTERVAL '11:12:10.2222222' HOUR TO SECOND(7)
±íʾ: 11Сʱ12·Ö10.2222222Ãë
INTERVAL '11:20' HOUR TO MINUTE
±íʾ: 11Сʱ20·Ö
INTERVAL '10' HOUR
±íʾ: 10Сʱ
INTERVAL '10:22' MINUTE TO SECOND
±íʾ: 10·Ö22Ãë
INTERVAL '10' MINUTE
±íʾ: 10·Ö
INTERVAL '4' DAY
±íʾ: 4Ìì
INTERVAL '25' HOUR
±íʾ: 25Сʱ
INTERVAL '40' MINUTE
±íʾ: 40·Ö
INTERVAL '120' HOUR(3)
±íʾ: 120Сʱ
INTERVAL '30.12345' SECOND(2,4)
±íʾ: 30.1235Ãë, ÒòΪ¸ÃµØ·½ÃëµÄºóÃ澫¶ÈÉèÖÃΪ4, Òª½øÐÐËÄÉáÎåÈë.
INTERVAL '20' DAY - INTERVAL '240' HOUR = INTERVAL '10-0' DAY TO SECOND
±íʾ: 20Ìì - 240Сʱ = 10Ìì0Ãë
==================
¸Ã²¿·ÖÀ´Ô´£ºhttp://www.oraclefans.cn/forum/showblog.jsp?rootid=140
INTERVAL DAY TO SECONDÀàÐÍ´æ´¢Á½¸öTIMESTAMPÖ®¼äµÄʱ¼ä²îÒ죬ÓÃÈÕÆÚ¡¢Ð¡Ê±¡¢·ÖÖÓ¡¢ÃëÖÓÐÎʽ±íʾ¡£¸ÃÊý¾ÝÀàÐ͵ÄÄÚ²¿´úÂëÊÇ183£¬³¤¶Èλ11×Ö½Ú£º
l 4¸ö×Ö½Ú±íʾÌìÊý£¨Ôö¼Ó0X80000000Æ«ÒÆÁ¿£©
l Сʱ¡¢·ÖÖÓ¡¢ÃëÖÓ¸÷ÓÃÒ»¸ö×Ö½Ú±íʾ£¨Ôö¼Ó60Æ«ÒÆÁ¿£©
l 4¸ö×Ö½Ú±íʾÃëÖÓµÄСʱ²îÒ죨Ôö¼Ó0X80000000Æ«ÒÆÁ¿£©
ÒÔÏÂÊÇÒ»¸öÀý×Ó£º
SQL&g
Ïà¹ØÎĵµ£º
ÉùÃ÷£ºÒÔÏÂÄÚÈÝת×Ô http://www.weixiuwang.com/Article/server/tech/200610/22126.html
1. ²éѯÕýÔÚÖ´ÐÐÓï¾äµÄÖ´Ðмƻ®(Ò²¾ÍÊÇʵ¼ÊÓï¾äÖ´Ðмƻ®)
select * from v$sql_plan where hash_value = (select sql_hash_value from v$session where sid = 1111);
ÆäÖÐidºÍparent_id±íʾ ......
²ÎÊý
UNDO_MANAGEMENT = AUTO --¹ÜÀíģʽ,¿ÉΪAUTO»òMANUAL.Ö»ÄÜÔÚÆôʼ²ÎÊýÎļþÀïÃæÐÞ¸Ä
UNDO_TABLESPACE = undo --Öƶ¨´æ´¢»¹ÔÊý¾ÝµÄ±í¿Õ¼ä,Òà¿ÉÓÃALTER SYSTEM SET undo_tablespace = 'abc'À´¸ ......
ÒòΪÏîĿijЩģ¿éµÄÊý¾Ý½á¹¹Éè¼ÆûÓÐÑϸñ°´ÕÕij¹æ·¶Éè¼Æ£¬ËùÒÔÖ»ÄÜ´ÓÊý¾Ý¿âÖвéѯÊý¾Ý½á¹¹£¬ÐèÒª²éѯµÄÐÅÏ¢ÈçÏ£º×Ö¶ÎÃû³Æ¡¢Êý¾ÝÀàÐÍ¡¢ÊÇ·ñΪ¿Õ¡¢Ä¬ÈÏÖµ¡¢Ö÷¼ü¡¢Íâ¼üµÈµÈ¡£
ÔÚÍøÉÏËÑË÷Á˲éѯÉÏÊöÐÅÏ¢µÄ·½·¨£¬×ܽáÈçÏ£º
Ò»£¬²éѯ±í»ù±¾ÐÅÏ¢
select
utc.column_name,utc.data_type,utc.data_le ......
ÔÚ´ó¶àÊýʱºòÎÒÃÇÔÚÉè¼Æ³ÌÐòµÄʱºò¶¼×ñÑÏÂÃæµÄ²½Ö裺
1¡¢´ò¿ªÓαê
2¡¢¿ªÊ¼Ñ»·
3¡¢´ÓÓαêÖÐÈ¡Öµ
ÄÇÒ»Ðб»·µ»Ø
5¡¢´¦Àí
6¡¢¹Ø±ÕÑ»·
7¡¢¹Ø±ÕÓαê
¿ÉÒÔ¼òµ¥µÄ°ÑÕâÒ»Àà´úÂë³ÆΪÓαêÓÃÓÚÑ»·¡£µ«»¹ÓÐÒ»ÖÖÑ»·ÓëÕâÖÖÀàÐͲ»Ïàͬ£¬Õâ¾ÍÊÇFORÑ»·£¬ÓÃÓÚFORÑ»·µÄÓα갴ÕÕÕý³£µÄÉùÃ÷·½Ê½ÉùÃ÷£¬ËüµÄÓŵ ......
¡¡1¡¢Ä¿µÄ£º
¡¡¡¡OracleϵͳÖеÄprofile¿ÉÒÔÓÃÒÔ¶ÔÓû§ËùÄÜÊ©ÓõÄÊý¾Ý¿â×ÊÔ´½øÕ¹ÏÞÖÆ£¬ÔËÓÃCreate ProfileÏÂÁî´´°ìÒ»¸öProfile£¬ÓÃËüÀ´¶ÒÏÖ¶ÔÊý¾Ý¿â×ÊÔ´µÄÏÞÖÆÔËÓã¬Èç¹û°Ñ¸Ãprofile·ÖÅä¸øÓû§£¬Ôò¸ÃÓû§ËùÄÜÊ©ÓõÄÊý¾Ý¿â×ÊÔ´¶¼ÔÚ¸ÃprofileµÄÏÞÖÆÒÔÄÚ¡£
¡¡¡¡2¡¢Ìõ¼þ£º
¡¡¡¡´´ÉèprofileÎñ±ØÒªÓÐCREATE PROFILEµÄÏµÍ ......