Skip to content

Instantly share code, notes, and snippets.

@kimki1124
Created March 8, 2017 12:35
Show Gist options
  • Save kimki1124/812f2ab5c4b4e35132ae341fa4f4a0b5 to your computer and use it in GitHub Desktop.
Save kimki1124/812f2ab5c4b4e35132ae341fa4f4a0b5 to your computer and use it in GitHub Desktop.
[ORACLE] SQL 함수 (날짜 함수, 변환 함수, NULL 관련 함수, 기타 함수)
SELECT EMPLOYEE_ID,
TO_CHAR(START_DATE, 'YYYY') START_YEAR,
TO_CHAR(END_DATE, 'YYYY') END_YEAR,
NULLIF(TO_CHAR(END_DATE, 'YYYY'), TO_CHAR(START_DATE, 'YYYY')) NULLIF_YEAR
FROM JOB_HISTORY;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment