CREATE VIEW TEST_VIEW1
AS
SELECT NAME, DEPTNO, SAL
FROM EMP2;
SELECT COLUMN11, COLUMN12, ...
FROM TABLE1 TABLE_ALIAS1 JOIN
(SELECT COLUMN21, COLUMN22 FROM TABLE) AS TABLE ALIAS2
ON TABLE_ALIAS.COLUMN1 = TABLE_ALIAS2.COLUMN21
사용 예시
SELECT NAME, E.DEPTNO, SAL
FROM EMP2 E JOIN
(SELECT DEPTNO, MAX(SAL) AS MAX_SAL
FROM EMP2
GROUP BY DEPTNO) I
ON E.DEPTNO = I.DEPTNO AND E.SAL = I.MAX_SAL;