OracleÈÕÆÚº¯Êý¼¯½õ(¶þ)
OracleÈÕÆÚº¯Êý¼¯½õ(¶þ)
¶þ¡¢³£ÓÃʱ¼äº¯Êý
1.trunc(sysdate,'Q') ±¾¼¾¶ÈµÚÒ»Ìì
SQL> select trunc(sysdate,'Q') from dual;
TRUNC(SYSDATE,'Q')
------------------
2007-4-1
2.trunc(sysdate,'D') ±¾ÖܵĵÚÒ»Ìì(ÖÜÈÕ)
SQL> select trunc(sysdate,'D')from dual;
TRUNC(SYSDATE,'D')
------------------
2007-5-27
3.last_day(sysdate) ±¾ÔÂ×îºóÒ»Ìì
SQL> select last_day(sysdate) from dual;
LAST_DAY(SYSDATE)
-----------------
2007-5-31 15:20:3
4.add_months(sysdate,2) ÈÕÆÚsysdateºóÍÆ2¸öÔÂ
SQL> select add_months(sysdate,2) from dual;
ADD_MONTHS(SYSDATE,2)
---------------------
2007-7-29 15:21:14
5.next_day(sysdate,2) ÈÕÆÚsysdateÖ®ºóµÄµÚÒ»ÖÜÖÐ,µÚ2(Ö¸¶¨ÐÇÆڵĵڼ¸Ìì)ÊÇʲôÈÕÆÚ
SQL> select next_day(sysdate,2) from dual;
NEXT_DAY(SYSDATE,2)
-------------------
2007-6-4 15:22:10
6.Months_between(f,s) ÈÕÆÚfºÍs¼äÏà²îÔÂÊý
SQL> select months_between(sysdate,to_date('2007-04-12','yyyy-mm-dd'))from dual;
MONTHS_BETWEEN(SYSDATE,TO_DATE
------------------------------
1.56909908900836
7.µÃµ½SYSDATE+5ËùÔÚµÄÔ·Ý
SQL> SELECT to_char(SYSDATE+5,'mon','nls_date_language=american') from dual;
TO_CHAR(SYSDATE+5,'MON','NLS_D
------------------------------
jun
8.current_date()·µ»Øµ±Ç°»á»°Ê±ÇøÖеĵ±Ç°ÈÕÆÚ¡£
9.select dbtimezone from dual;
10.extract()ÕÒ³öÈÕÆÚ»ò¼ä¸ôÖµµÄ×Ö¶ÎÖµ
SQL> select extract(month from sysdate) "This Month" from dual;
This Month
----------
5
SQL> select extract(year from sysdate) "This year" from dual;
This year
----------
2007
SQL> select extract(month from add_months(sysdate,2)) " Month" from dual;
Month
----------
7
==================================================================
Ïà¹ØÎĵµ£º
OracleOraHome92Agent
OracleOraHome92ClientCache
OracleOraHome92HTTPServer
OracleOraHome92PagingServer
OracleOraHome92SNMPPeerEncapsulator
OracleOraHome92SNMPPeerMasterAgent
·Ö±ðÊÇ:
Agent´úÀí, OEMÈý²ã¹ÜÀíʱÓëOMS½øÐеǼǴ¦¹µÍ¨;
¿Í»§¶ËÐÅÏ¢Cache;
ÌṩWeb·þÎñ;
BP»ú֪ͨ·þÎñ,±ÈÈçÊý¾Ý¿âÓ ......
SQLÖеĵ¥¼Ç¼º¯Êý
1.ASCII
·µ»ØÓëÖ¸¶¨µÄ×Ö·û¶ÔÓ¦µÄÊ®½øÖÆÊý;
SQL> select ascii('A') A,ascii('a') a,ascii('0') zero,ascii(' ') space from dual;
A A ZERO ......
±í´Ø£¨table cluster)ÊÇÒ»¸öÊý¾Ý¿â¶ÔÏó£¬Ëü¿ÉÒÔ½«ÄÇЩ¾³£ÔÚÏàͬÊý¾Ý¿éÖÐÒ»ÆðʹÓõıí½øÐÐÎïÀí·Ö×é¡£µ±Äã´¦ÀíÄÇЩ¾³£Á¬½ÓÔÚÒ»Æð½øÐвéѯµÄ±íʱ£¬±í´ØÊÇÌرðÓÐЧµÄ¡£Ò»¸ö±í´Ø´æ´¢´Ø¼ü£¨ÓÃÓÚ½«±íÁ¬½Óµ½Ò»ÆðµÄÁУ©£¬ÒÔ¼°´Ø±íÖеÄÁÐÖµ¡£ÒòΪ´ØÖÐµÄ±í¶¼±»´¢´æÔÚÏàͬµÄÊý¾Ý¿â¿éÖУ¬ËùÒÔʹÓôع¤×÷ʱ£¬I/O²Ù×÷¾Í¼õÉÙÁË¡£
......
Êý¾Ý¿âÊÇÒ»¸ö¶àÓû§Ê¹ÓõĹ²Ïí×ÊÔ´¡£µ±¶à¸öÓû§²¢·¢µØ´æÈ¡Êý¾Ýʱ£¬ÔÚÊý¾Ý¿âÖоͻá²úÉú¶à¸öÊÂÎñͬʱ´æȡͬһÊý¾ÝµÄÇé¿ö¡£Èô¶Ô²¢·¢²Ù×÷²»¼Ó¿ØÖƾͿÉÄÜ»á¶ÁÈ¡ºÍ´æ´¢²»ÕýÈ·µÄÊý¾Ý£¬ÆÆ»µÊý¾Ý¿âµÄÒ»ÖÂÐÔ¡£
¼ÓËøÊÇʵÏÖÊý¾Ý¿â²¢·¢¿ØÖƵÄÒ»¸ö·Ç³£ÖØÒªµÄ¼¼Êõ¡£µ±ÊÂÎñÔÚ¶Ôij¸öÊý¾Ý¶ÔÏó½øÐвÙ×÷Ç°£¬ÏÈÏòϵͳ·¢³öÇëÇ󣬶ÔÆä¼ÓËø¡£¼ÓËøº ......
SQLÖеĵ¥¼Ç¼º¯Êý
1.ASCII
·µ»ØÓëÖ¸¶¨µÄ×Ö·û¶ÔÓ¦µÄÊ®½øÖÆÊý;
SQL> select ascii('A') A,ascii('a') a,ascii('0') zero,ascii(' ') space from dual;
A A ZERO SPACE
--------- --------- -- ......