Oracle Database 10g SQL Fundamentals I - Practice 10
개발 및 관리/Oracle 9i, 10g, 11g, 12c, 19c 2012. 11. 13. 17:21반응형
Oracle Database 10g SQL Fundamentals I - Practice 10
1.
CREATE OR REPLACE VIEW EMPLOYEES_VU
AS SELECT EMPLOYEE_ID, LAST_NAME AS EMPLOYEE, DEPARTMENT_ID
FROM EMPLOYEES;
2.
SELECT * FROM EMPLOYEES_VU;
3.
SELECT EMPLOYEE, DEPARTMENT_ID FROM EMPLOYEES_VU;
4.
CREATE OR REPLACE VIEW DEPT50
AS
SELECT EMPLOYEE_ID AS EMPNO, LAST_NAME AS EMPLOYEE, DEPARTMENT_ID AS DEPTNO
FROM EMPLOYEES
WHERE DEPARTMENT_ID = 50;
-- WITH CHECK OPTION CONSTRAINT EMP_DEPT_50;
5.
SELECT * FROM DEPT50;
6.
UPDATE DEPT50
SET DEPTNO = 80
WHERE EMPNO = 143
;
7.
CREATE SEQUENCE DEPT_ID_SEQ
START WITH 200
INCREMENT BY 10
MAXVALUE 1000
;
8. ???
9.
CREATE INDEX DEPT_DNAME_IDX ON DEPT(DNAME);
10.
CREATE SYNONYM EMP01 FOR EMPLOYEES;
반응형
'개발 및 관리 > Oracle 9i, 10g, 11g, 12c, 19c' 카테고리의 다른 글
Oracle Database 10g SQL Fundamentals I - Practice 11 (0) | 2012.11.13 |
---|---|
Oracle Database 10g SQL Fundamentals I - Practice 8 (0) | 2012.11.13 |
Oracle Database 10g SQL Fundamentals I - Practice 9 (0) | 2012.11.13 |
Set Operators (0) | 2012.11.13 |
Oracle Database 10g SQL Fundamentals I - Practice 7 (0) | 2012.11.13 |