1.CREATE ORACLE VIEW
CREATE OR REPLACE VIEW myview
AS
SELECT * FROM books WHERE price>30
WITH CHECK OPTION --When INSERT DATA THROUGH VIEW,If the DATA IS NOT
-- IN THE WHERE ,IT CAN'T BE INSERT INTO
/
2.CREATE READ ONLY VIEW
CREATE OR REPLACE VIEW v_read
AS
SELECT eid,ename FROM emp
WITH READ ONLY --CAN'T INSERT INTO DATA
/
--WHEN THE VIEW IS NOT ONLY IN ONE TABLE OR HAVE GROUP BY, DISTINCT AND SO ON, CAN'T INSERT INTO DATA TOO.OFTEN,VIEW IS USED FOR SELECT ONLY.
4.DISPLAY VIEW
SELECT TEXT FROM User_views WHERE VIEW_NAME ='V_READ'
/
DESC USER_views(dba_views)--DISPLAY ALL USER VIEWS