CREATE VIEW EMP_VIEW AS
SELECT EMPNO, ENAME, JOB, HIREDATE
FROM emp;
SELECT * FROM EMP_VIEW;
CREATE VIEW STU_VIEW AS
SELECT STU_NUM,STU_NAME
FROM join_stu;
SELECT * FROM STU_VIEW;
SELECT * FROM STU_VIEW
WHERE STU_NUM>2;
CREATE VIEW STU_VIEW_2 AS
SELECT STU_NUM S_NUM, STU_NAME S_NAME
FROM join_stu
WHERE STU_NUM<4;
SELECT S_NUM FROM STU_VIEW_2;
CREATE VIEW STU_SCORE_VIEW AS
SELECT STU.STU_NUM, STU_NAME, SCORE
FROM join_stu STU JOIN join_score SCORE
ON STU.STU_NUM=SCORE.STU_NUM;
SELECT * FROM STU_SCORE_VIEW
WHERE SCORE>70;
join을 좀 더 간편하게 이용할 수 있는 듯