null은 정렬했을때 oracle에서는 가장 큰 값이 되고, sql server에서는 가장 작은 값이 된다. merge : 특정 데이터를 넣을 때 해당 테이블 키 값을 기준으로 있으면 update, 없으면 insert를 한다. commit, rollback, savepoint? PK, not null, unique ROLLUP, CUBE 윈도우 함수 - rows between and 값이 증가한다 (?) rows between UNBOUNDED PRECEDING and CURRENT ROW) as "직업별 합계" rows between 1 PRECEDING and 1 FOLLOWING) as "위아래합계" - range between and 값이 동일하다(?) 1. UNBOUNDED PRECEDING: ..
synonym : 별명 계층형 쿼리(Hierarchical Query)? 대분류, 중분류, 소분류, 답글 등 select empno, ename, job, mgr prior ename as mgr_name ,level ,lpad(' ', (level-1)*2, ' ') || ename as depth_ename ,sys_connect_by_path(ename, '-') as ename_list from emp start with mgr is null connect by prior empno = mgr order siblings by empno; START WITH mgr IS NULL : 계층구조의 시작 조건(mgr은 나를 관리하는 상사의 empno) CONNECT BY PRIOR empno = mgr ..