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

OracleÖеÄTo_dateº¯Êý


OracleÖеÄto_date()º¯Êý
to_date()Óë24СʱÖƱíʾ·¨¼°mm·ÖÖÓµÄÏÔʾ£º
Ò»¡¢ÔÚʹÓÃOracleµÄto_dateº¯ÊýÀ´×öÈÕÆÚת»»Ê±£¬ºÜ¶àJava³ÌÐòÔ±Ò²Ðí»áÖ±½ÓµÄ²ÉÓÓyyyy-MM-dd     HH:mm:ss”µÄ¸ñʽ×÷Ϊ¸ñʽ½øÐÐת»»£¬µ«ÊÇÔÚOracleÖлáÒýÆð´íÎ󣺓ORA 01810 ¸ñʽ´úÂë³öÏÖ
    Á½´Î”¡£
    È磺select to_date('2005-01-01 13:14:20','yyyy-MM-dd HH24:mm:ss') from dual;
    Ô­ÒòÊÇSQLÖв»Çø·Ö´óСд£¬MMºÍmm±»ÈÏΪÊÇÏàͬµÄ¸ñʽ´úÂ룬ËùÒÔOracleµÄSQL²ÉÓÃÁËmi´úÌæ
    ·ÖÖÓ¡£
    select to_date('2005-01-01 13:14:20','yyyy-MM-dd HH24:mi:ss') from dual;
¶þ¡¢ÁíÒªÒÔ24СʱµÄÐÎʽÏÔʾ³öÀ´ÒªÓÃHH24
    select to_char(sysdate,'yyyy-MM-dd HH24:mi:ss') from dual;//miÊÇ·ÖÖÓ
    select to_char(sysdate,'yyyy-MM-dd HH24:mm:ss') from dual;//mm»áÏÔʾÔ·ݠ 
    oracleÖеÄto_date²ÎÊýº¬Òå
    1.ÈÕÆÚ¸ñʽ²ÎÊýº¬Òå˵Ã÷  
      D Ò»ÖÜÖеÄÐÇÆÚ¼¸  
      DAY ÌìµÄÃû×Ö£¬Ê¹ÓÿոñÌî³äµ½9¸ö×Ö·û  
      DD ÔÂÖеĵڼ¸Ìì  
      DDD ÄêÖеĵڼ¸Ìì  
      DY ÌìµÄ¼òдÃû  
      IW ISO±ê×¼µÄÄêÖеĵڼ¸ÖÜ  
      IYYY ISO±ê×¼µÄËÄλÄê·Ý  
      YYYY ËÄλÄê·Ý  
      YYY,YY,Y Äê·ÝµÄ×îºóÈý룬Á½Î»£¬Ò»Î»  
      HH Сʱ£¬°´12Сʱ¼Æ  
      HH24 Сʱ£¬°´24Сʱ¼Æ  
      MI ·Ö  
      SS Ãë  
      MM Ô  
      Mon Ô·ݵļòд  
      Month Ô·ݵÄÈ«Ãû  
      W


Ïà¹ØÎĵµ£º

Upgrade Oracle 9i RAC to Oracle 10g RAC

Upgrade Oracle 9i RAC to Oracle 10g RAC
by Vincent Chan
This article provides the procedures for converting Oracle 9i (9.2.0.4) RAC to Oracle 10g (10.2.0.1) RAC on Red Hat Enterprise Linux 3 (RHEL3).
Oracle Database 10g and Oracle Real Application Cluster (RAC) 10g itself, boast many new and ex ......

OracleÖг£Óõĺ¯Êý

  ---sqlµÄº¯ÊýµÄʹÓÃ(Oracle)      
      ---dualµÄʹÓãºÑÆÔª±í£ºÃ»ÓбíÐèÒª²éѯµÄʱºò ¿ÉÒÔÓÃËü
               ---select 'Hello World' from dual;     ---½á¹û£ºH ......

oracleºÍsqlserver²éѯʱ×èÈûÇé¿ö

1.oracle»·¾³
create table test
(
id number(4),
name varchar2(20)
)
ÔÚÒ»¸ösessionÖÐ
insert into test values(1,'aa');
ÔÚÁíÒ»¸ösessionÖÐ
select * from test1;
²éѯû±»×èÈû
2.sqlserver»·¾³
ÔÚÒ»¸ösessionÖÐ
insert into test values(1,'aa');
ÔÚÁíÒ»¸ösessionÖÐ
select * from test1;
²éѯ±»×èÈû(Ê ......

OracleÁÙʱ±íµÄ½¨Á¢¼°Ê¹ÓÃ....

ÔÚOracle8i»òÒÔÉÏ°æ±¾ÖУ¬¿ÉÒÔ´´½¨ÒÔÏÂÁ½ÖÖÁÙʱ±í£º    
  1¡£»á»°ÌØÓеÄÁÙʱ±í    
          CREATE   GLOBAL   TEMPORARY   <TABLE_NAME>   (<column   specification>)    
        &nbs ......

oracle cast() º¯ÊýÎÊÌâ

oracle cast() º¯ÊýÎÊÌâ
SQL> create table t1(a varchar(10));
Table created.
SQL> insert into t1 values ('12.3456');
1 row created.
SQL> select round(a) from t1;
  ROUND(A)
----------
        12
SQL> select round(a,3) from t1;
ROUND(A,3)
- ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ