oracleʱ¼äÈÕÆÚº¯Êý
1¡¢×ª»»º¯Êý
Óëdate²Ù×÷¹Øϵ×î´óµÄ¾ÍÊÇÁ½¸öת»»º¯Êý£ºto_date(),to_char()
to_date() ×÷Óý«×Ö·ûÀàÐÍ°´Ò»¶¨¸ñʽת»¯ÎªÈÕÆÚÀàÐÍ£º
¾ßÌåÓ÷¨:to_date(''2004-11-27'',''yyyy-mm-dd''),Ç°ÕßΪ×Ö·û´®£¬ºóÕßΪת»»ÈÕÆÚ¸ñʽ£¬×¢Ò⣬ǰºóÁ½ÕßÒªÒÔÒ»¶ÔÓ¦¡£
Èç;to_date(''2004-11-27 13:34:43'', ''yyyy-mm-dd hh24:mi:ss'') ½«µÃµ½¾ßÌåµÄʱ¼ä
¶àÖÖÈÕÆÚ¸ñʽ£º
YYYY£ºËÄλ±íʾµÄÄê·Ý
YYY£¬YY£¬Y£ºÄê·ÝµÄ×îºóÈýλ¡¢Á½Î»»òһλ£¬È±Ê¡Îªµ±Ç°ÊÀ¼Í
MM£º01~12µÄÔ·ݱàºÅ
MONTH£º¾Å¸ö×Ö·û±íʾµÄÔ·ݣ¬ÓÒ±ßÓÿոñÌî²¹
MON£ºÈýλ×Ö·ûµÄÔ·ÝËõд
WW£ºÒ»ÄêÖеÄÐÇÆÚ
D£ºÐÇÆÚÖеĵڼ¸Ìì
DD£ºÔ·ÝÖеĵڼ¸Ìì
DDD£ºÄêËùÖеĵڼ¸Ìì
DAY£º¾Å¸ö×Ö·û±íʾµÄÌìµÄÈ«³Æ£¬ÓÒ±ßÓÿոñ²¹Æë
HH£¬HH12£ºÒ»ÌìÖеĵڼ¸¸öСʱ£¬12½øÖƱíʾ·¨
HH24£ºÒ»ÌìÖеĵڼ¸¸öСʱ£¬È¡ÖµÎª00~23
MI£ºÒ»Ð¡Ê±ÖеķÖÖÓ
SS£ºÒ»·ÖÖÓÖеÄÃë
SSSS£º´ÓÎçÒ¹¿ªÊ¼¹ýÈ¥µÄÃëÊý
to_char():½«ÈÕÆÚת°´Ò»¶¨¸ñʽ»»³É×Ö·ûÀàÐÍ
SQL> select to_char(sysdate,''yyyy-mm-dd hh24:mi:ss'') time from dual;
TIME
-------------------
2004-10-08 15:22:58
¼´°Ñµ±Ç°Ê±¼ä°´yyyy-mm-dd hh24:mi:ss¸ñʽת»»³É×Ö·ûÀàÐÍ
ÔÚoracleÖд¦ÀíÈÕÆÚ´óÈ«
TO_DATE¸ñʽ
Day:
dd number 12
dy abbreviated fri
day spelled out friday
ddspth spelled out, ordinal twelfth
Month:
mm number 03
mon abbreviated mar
month spelled out march
Year:
yy two digits 98
yyyy four digits 1998
24Сʱ¸ñʽÏÂʱ¼ä·¶Î§Îª£º 0:00:00 - 23:59:59....
12Сʱ¸ñʽÏÂʱ¼ä·¶Î§Îª£º 1:00:00 - 12:59:59 ....
[ZT]ÈÕÆÚºÍ??º¯???
1.
ÈÕÆÚºÍ×Ö·ûת»»º¯ÊýÓ÷¨£¨to_date,to_char£©
2.
select to_char( to_date(222,''J''),''Jsp'') from dual
ÏÔʾTwo Hundred Twenty-Two
3.
ÇóijÌìÊÇÐÇÆÚ¼¸
select to_char(to_date(''2002-08-26'',''yyyy-mm-dd''),''day'') from dual;
ÐÇÆÚÒ»
select
to_char(to_date(''2002-08-26'',''y
Ïà¹ØÎĵµ£º
ѧϰOracle DBAÒ²°ë¸ö¶àѧÆÚÁË£¬½ñÌìÃÍÈ»²Å·¢ÏÖ£¬ÔÀ´ÎÒµÄÊ黹ÊǺÜеģ¬ÉϿβÙ×÷ʱºòÒ²Ö»ÊÇÖªµÀ´ó¸ÅÔõô×ö£¬µ«ÊÇÒªÕæµÄÈ«²¿×Ô¼º×ö£¬¶ø²»È¥·Ê黹ÊÇÓÐÒ»¶¨µÄÄѶȵģ¬ËùÒÔÄØ£¬½ñÌ쿪ʼ½«DBA´ÓÍ·¸´Ï°Ò»±é£¬Í¬Ê±ÔÙ²Ù×÷Ò»±é¡£
µÚÒ»Õ£¬Ñ§µÄÊÇOracleµÄÌåϵ½á¹¹£ ......
ÎÒÏÖÔÚÏëʵÏÖÒ»¸öÅжÏORACLEÖÐÒ»¸öÊÓͼÊÇ·ñ´æÔÚ£¬Èç¹û´æÔÚ¾Íɾ³ý¡£
ÔÚ³ÌÐòÖÐÎÒÕâÑùдµÄ:
try
{
#pragma region [ɾµôÀϵÄÊÓͼ]
csSqlText.Format("SELECT COUNT(*) AS ÊÓͼ¼ÆÊý from SYS.ALL_VIEWS WHERE VIEW_NAME='%s';",csViewName);
if (!dbcontroler.Connect_to((_bstr_t)m ......
´ÓOracle 9i¿ªÊ¼£¬OracleµÄ°²×°È±Ê¡°üº¬ÁËXDB¡£ÔÚÆô¶¯Êý¾Ý¿âºó£¬Oracle XDBµÄhttp·þÎñ½«»á×Ô¶¯Õ¼ÓÃÁË8080¶Ë¿Ú£¬Õâ¸øʹÓûòJBoss¡¢Tomcat½øÐÐjava web¿ª·¢µÄÈËÔì³ÉÁËÐí¶à²»±ØÒªµÄÂé·³¡£
±¾ÎĽ«Ö÷Òª½éÉÜÐÞ¸ÄXDBµÄhttpºÍftp·þÎñ¶Ë¿ÚµÄ3ÖÖ·½·¨¡£
1.ʹÓÃdbms_xdb°üÐ޸Ķ˿ÚÉèÖÃ
ʹÓÃsysµÇ¼sqlplus
sqlplus sys/password ......
1.ʲôÊÇRMAN£¿
¡¡¡¡RMAN¿ÉÒÔÓÃÀ´±¸·ÝºÍ»¹ÔÊý¾Ý¿âÎļþ¡¢¹éµµÈÕÖ¾ºÍ¿ØÖÆÎļþ¡£ËüÒ²¿ÉÒÔÓÃÀ´Ö´ÐÐÍêÈ«»ò²»ÍêÈ«µÄÊý¾Ý¿â»Ö¸´¡£
¡¡¡¡×¢Ò⣺RMAN²»ÄÜÓÃÓÚ±¸·Ý³õʼ»¯²ÎÊýÎļþºÍ¿ÚÁîÎļþ¡£
¡¡¡¡RMANÆô¶¯Êý¾Ý¿âÉϵÄOracle·þÎñÆ÷½ø³ÌÀ´½øÐб¸·Ý»ò»¹Ô¡£±¸·Ý¡¢»¹Ô¡¢»Ö¸´ÊÇÓÉÕâЩ½ø³ÌÇý¶¯µÄ¡£
¡¡¡¡RMAN¿ÉÒÔÓÉOEMµÄBackup Manager ......