본문 바로가기
DataBase/Oracle

oracle 문자함수

by 쏜스 2021. 12. 19.
반응형

select
    ASCII('a') r1,
    chr('65') r2,
    chr(ASCII('c')) r3,
    INITCAP('asd erd') r4,
    INSTR('seexefrxew', 'x', 2) r5,
    least('2', '3', '5') r6,
    LENGTH('오라클oracle') r7,
    lpad('80', 3, '0') r8,
    lower('AFEISue') r9,
    TRIM('  AAA  ') r10,
    LTRIM('@@@AAA@@@', '@') r11,
    RTRIM('@@@BBB@@@', '@') r12,
    substr('testeeqq', 3) r13,
    instr(substr('testeeqq', 3), 'e') r14,
    'hello' || '-' || 'oracle' r15,
    substr(lpad('80', 3, '0'), 2) r16,
    replace ('eoracle', 'e', '!') r17, -- 문자열을 치환
    TRANSLATE('eoracle', 'raq', '@@') r18 -- 문자를 치환
from
    dual;

반응형