[Oracle] WINDOW FUNCTION 윈도우 함수
WINDOW FUNCTION -- 윈도우 함수에는 OVER 문구가 필수 포함된다. SELECT * FROM SCOTT.EMP; SELECT * FROM SCOTT.DEPT; 그룹 내 순위 함수 1. RANK – 순위 구하기 SELECT JOB, ENAME, SAL, RANK() OVER (ORDER BY SAL DESC) ALL_RANK, RANK() OVER (PARTITION BY JOB ORDER BY SAL DESC) JOB_RANK FROM EMP; SELECT JOB, ENAME, SAL, RANK() OVER (ORDER BY SAL DESC) ALL_RANK FROM EMP; SELECT JOB, ENAME, SAL, RANK() OVER (PARTITION BY JOB ORDER BY S..
2022. 6. 12.
[Oracle / MySQL] NULL 개념, 처리
ORACLE / MYSQL NULL 개념, 처리방법 -- MySQL 에서 NULL CREATE TABLE test_db.t1 (ID INT,C1 VARCHAR(10)); INSERT INTO test_db.t1 VALUES (1,1); INSERT INTO test_db.t1 VALUES (2,'2'); INSERT INTO test_db.t1 VALUES (3,NULL); INSERT INTO test_db.t1 VALUES (4,'4'); INSERT INTO test_db.t1 VALUES (5,''); INSERT INTO test_db.t1 VALUES (6,6); INSERT INTO test_db.t1 VALUES (7,' '); INSERT INTO test_db.t1 VALUES (8,'..
2022. 6. 11.