Func

DB

[DB] Decode vs Case when

Decode decode(target_col,null,null,0,0,coalesce(target_col2 / target_col, 0)) Case whencase when target_col1 IS NULL then null when target_col1 = 0 then 0 when (target_col1 is null and target_col1 != 0) then coalesce(target_col2 / target_col1,0) ELSE ....  1. 대규모 데이터 및 복잡한 쿼리인 경우 Case when의 속도가 더 빠름.2. Case 문은 statement 이고 decode 는 func에 해당한다. 3. Case 는 sql / pl/sql 모두 쓰이나, deco..

girin_dev
'Func' 태그의 글 목록