View

From Oracle FAQ

Jump to: navigation, search

A view is the result of a SQL query stored in the Oracle data dictionary. One can think of a view as a virtual table or presentation of data from one or more tables. Views are useful for security and information hiding, but can cause problems if nested too deep. View details can be queried from the dictionary by querying either USER_VIEWS, ALL_VIEWS or DBA_VIEWS.

Examples

CREATE VIEW dept20 
    AS SELECT ename, sal*12 annual_salary 
         FROM emp 
        WHERE deptno = 20; 
CREATE VIEW clerk (id_number, person, department, position)
    AS SELECT empno, ename, deptno, job 
         FROM emp 
         WHERE job = 'CLERK'
  WITH READ ONLY;


Glossary of Terms
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z #
Personal tools