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
- 날짜
- JSTL
- jquery
- 오라클
- 문자열
- 네이버스마트 에디터
- 스크립트
- HTML5
- spring form tag
- maven
- 한글
- 톰캣
- exception
- MYSQL
- java
- DB
- 전자정부 표준프레임워크
- html
- checbox
- 웹 플랫폼 설치 관리자
- null
- php
- @RequestBody
- 호환성
- switch
- json
- 이클립스
- SSL
- Oracle
- RADIO
Archives
- Today
- Total
개인적인 정리
[Oracle] NVL() 본문
오라클 NVL()
NVL()
-
NVL(expr1, expr2)
의 형태
NVL lets you replace null(returned as a blank) with a string in the results of a query. If expr1 is null, the NVL returns expr2. If expr1 is not null, then NVL returns expr1.
The argument expr1 and expr2 can have day data type. If their data types are different, then Oracle Database implictily converts one to the other. If they cannot be converted implicitly, then the database returns an error. The implicit conversion is implemented as follows :
- If expr1 is character data, then Oracle Database converts expr2 to the data type of expr1 before comparing them and returns VARCHAR2 in the character set of exp1.
- If expr1 is numeric, then Oracle Database determines which argument has the highest mumeric precedence, implicitly converts the other argument to that data type, and returns theat data type.
SQL> SELECT NVL(2,1), NVL(NULL, 1), NVL('TEST', '--'), NVL('', '--') FROM DUAL ;
--> 2 1 TEST --
'DB > ORACLE' 카테고리의 다른 글
[Oracle] RANK() (0) | 2020.04.14 |
---|---|
[Oracle] POWER() (0) | 2020.04.14 |
[Oracle] PERCENT_RANK() (0) | 2020.04.14 |
[Oracle]NVL2() (0) | 2020.04.13 |
[Oracle] NUMTOYMINTERVAL() (0) | 2020.04.13 |
[Oracle]NUMTODSINTERVAL() (0) | 2020.04.13 |
[Oralce] NULLIF() (0) | 2020.04.13 |
[Oracle] NTILE() (0) | 2020.04.13 |
Comments