Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- php
- SSL
- null
- checbox
- 오라클
- Oracle
- 네이버스마트 에디터
- switch
- json
- 톰캣
- JSTL
- java
- 전자정부 표준프레임워크
- maven
- spring form tag
- jquery
- 이클립스
- 호환성
- @RequestBody
- 문자열
- HTML5
- RADIO
- MYSQL
- 한글
- 스크립트
- html
- exception
- DB
- 날짜
- 웹 플랫폼 설치 관리자
Archives
- Today
- Total
개인적인 정리
[Oracle]NVL2() 본문
오라클 NVL2()
NVL2()
-
NVL2(expr1, expr2, expr3)
의 형태
NVL2 let you determine the value returned by a query based on whether a specified expression is null or not null. If expr1 is not null, then NVL2 returns expr2, if expr1 is null, then NVL2 returns expr3.
The argument expr1 can have any data type. The arguments expr2 and expr3 can have any data types except LONG.
If the data types expr2 and expr3 are different, then Oracle Database implicitly converts one to the other. If they cannot be converted implicitly, then the database returns an error. If expr2 is character or numeric data, then implicit conversion is implemented as follows :
- If expr2 is character data, then Oracle Database converts expr3 to the data type of expr2 before returning a value unless expr3 is null constant. In that case, a data type conversion is not necessary, and the database returns VARCAHR2 in the character set of expr2.
- If expr2 is numeric data, then Oracle Database determines which argument has the highest numeric precedence, implicitly converts the other argument to that data type, and returns that data type.
SQL>
SELECT
NVL2('', 'B', 'C'),
NVL2('A', 'B', 'C')
FROM DUAL;
--> C B
'DB > ORACLE' 카테고리의 다른 글
[Oracle]RATIO_TO_REPORT() (0) | 2020.04.14 |
---|---|
[Oracle] RANK() (0) | 2020.04.14 |
[Oracle] POWER() (0) | 2020.04.14 |
[Oracle] PERCENT_RANK() (0) | 2020.04.14 |
[Oracle] NVL() (0) | 2020.04.13 |
[Oracle] NUMTOYMINTERVAL() (0) | 2020.04.13 |
[Oracle]NUMTODSINTERVAL() (0) | 2020.04.13 |
[Oralce] NULLIF() (0) | 2020.04.13 |
Comments