Oacle 기술 교예

-- oracle 시간 유형의 사용 -- 시간 유형의 사용 select * from bureauinfo where bur_end_date > to_date('2011-09-30','yyyy-mm-dd'); --현재 시간 가 져 오기 select tochar(sysdate,'yyyy') from dual; --이번 주 첫날 마지막 날 을 마 시 는 두 가지 쓰기 select count (*) from bureauinfo where to_char(update_date,'yyyy') = to_char(sysdate,'yyyy') and         to_char(update_date,'ww') = to_char(sysdate+1,'WW')
select count(*) from bureau_info where update_date between trunc(sysdate,'day')+1 and trunc(sysdate,'day') + 8;
-- oracle 상용 데이터 형식
            :
                   
CHAR             2000 bytes 
VARCHAR2              4000 bytes          749
NCHAR                     2000 bytes 
NVARCHAR2                     4000 bytes 
DATE   ( - - ) DD-MM-YY(HH-MI-SS)       ,     
LONG           2G(231-1)          
RAW                2000 bytes            
LONG RAW                2G   
BLOB           4G 
CLOB          4G 
NCLOB                  4G 
BFILE                   4G 
ROWID             10 bytes ********.****.****  ,* 0 1
NROWID                    4000 bytes
NUMBER(P,S)      P    ,S    
DECIMAL(P,S)      P    ,S    
INTEGER          
FLOAT       NUMBER(38),   
REAL      NUMBER(63),    


  
  
  
  

-- ,bur_state ; '。。。。

   order by DECODE(bur_state, ' ',1,' ',2,' ',3,' ',4,' ',5)

좋은 웹페이지 즐겨찾기