반응형
Notice
Recent Posts
Recent Comments
Link
- Today
- Total
07-05 05:44
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Tags
- rxswift
- sigmoid
- SQL
- NVL
- 딥러닝
- grep
- Optional
- scheduledTimer
- deeplearning
- ios
- delegate
- r
- MVC
- tapply
- 명령어
- substr
- 시각화
- struct
- trunc
- SWIFT
- cocoapods
- decode
- Python
- Linux
- 연산자
- swiftUI
- Upper
- ReLU
- Observable
- barplot
Archives
목록NVL2 (1)
iOS 개발 기록 블로그
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/b2LhCA/btrpP4rueyo/9kcayFN3KRcYCsnGl1vNi0/img.png)
nvl2 위와 같은 데이터 테이블이 있다고 생각해봅시다. 예제) SELECT ename, sal, comm, nvl2(comm, sal+comm, sal) FROM emp; 설명) nvl2를 자세히 보면 comm(커미션)이 null이면 sal+comm이, null이 아니면 sal이 출력되도록 하는 함수입니다. decode 예시) SELECT ename, sal, deptno, decode(deptno, 10, 6000, 20, 3400, 0) 보너스 FROM emp; 설명) 사원번호(deptno)가 10이면 6000을, 20이면 3400을 보너스라는 컬럼명으로 해서 출력하라는 의미입니다. case decode는 등호(같다는) 비교만 가능합니다. 그러나 case는 보통의 프로그래밍 언어의 if else와 ..
SQL
2022. 1. 6. 22:30