일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- checbox
- DB
- 스크립트
- switch
- 전자정부 표준프레임워크
- @RequestBody
- 웹 플랫폼 설치 관리자
- jquery
- null
- spring form tag
- maven
- exception
- HTML5
- 날짜
- RADIO
- MYSQL
- 오라클
- SSL
- java
- 톰캣
- html
- Oracle
- 네이버스마트 에디터
- php
- 호환성
- 이클립스
- json
- 문자열
- 한글
- JSTL
- Today
- Total
개인적인 정리
[Oracle]RPAD() 본문
오라클 RPAD()
RPAD()
-
RPAD(expr1, n, expr2)
의 형태
RPAD returns expr1, right-padded to length n characters with expr2, replicated as many times as necessary. This function is useful for formatting the output of a query.
Both expr1 and expr2 can be any of the data types CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The string returned is of VARCHAR2 data type, and a LOB if expr1 is a LOB data type. The string returned is in the same character set as expr1. The argument n must be a NUMBER integer or a value that can be implicitly converted to a NUMBER interger.
expr1 cannot be null. if you do not specify expr2, then it defaults to a single blank. If expr1 is longer than n, then this function returns the portion of expr1 that fits in n.
The argument n is the total length of the return value as it is displayed on your terminal screen. In most character sets, this is also the number of characters in the return value. However, in some multibyte character sets, the display length of a character string can differ from the number of characters in the string.
오라클 OE 계정으로 테스트 가능.
SQL> SELECT
last_name, RPAD(' ', salary/1000/1, '*') "Salary"
FROM employees
WHERE department_id =80
ORDER BY last_name, "Salary";
SQL> SELECT
RPAD('AAAA', 6, '*')
FROM DUAL
;
--> AAAA**
'DB > ORACLE' 카테고리의 다른 글
[ORACLE] NULL 치환 - NVL (0) | 2021.07.28 |
---|---|
오라클 컬럼 이름 변경 (0) | 2021.02.19 |
[Oracle]RTRIM() (0) | 2020.06.11 |
[Oracle]ROW_NUMBER() (0) | 2020.06.11 |
[Oracle]ROUND(number) (0) | 2020.06.10 |
[Oracle]ROUND(date) (0) | 2020.06.10 |
[Oracle]REPLACE() (0) | 2020.06.10 |
[Oracle]REMAINDER() (0) | 2020.06.10 |