Views define a query that is going to be used frequently, store in the DB, allow users to call it by name as a table. a stored query. a virtual/derived table. Can use the view anywhere a tablename can be used. Does not contain data, so dropping it does not lose any data. Dynamically updated. recreated upon each use. Can join tables for ease of use. Can restrict users to certain columns only. CREATE [OR REPLACE] VIEW view_name AS SELECT ... DROP VIEW view_name; --what views are there? select * from cat; select * from cat where table_type='VIEW'; select * from tab; select * from tab where tabtype='VIEW'; --see the columns of a view (no different than a table) desc viewname --see the base query that is the view SELECT view_name,text_length,text FROM user_views WHERE view_name='PRODVEND'; --a view of join of product and vendor CREATE VIEW prodvend AS SELECT p_code,p_descript,v_name,v_contact FROM vendor,product WHERE vendor.v_code=product.v_code; Select * From prodvend; Select * From prodvend Where v_name Like 'Gomez%'; --PK query of pk.sql CREATE VIEW pkview AS SELECT A.table_name,constraint_type,B.column_name,A.constraint_name FROM user_constraints A,user_cons_columns B WHERE A.constraint_name=B.constraint_name AND constraint_type='P'; --use: Select * From pkview; Select * From pkview Where table_name='PET'; --FK query of fk.sql. --view can't have duplicate column names, so used column aliases CREATE VIEW fkview AS SELECT A.table_name,B.column_name,A.constraint_name,A.constraint_type,A.r_constraint_name,D.table_name AS ref_table_name,D.column_name AS ref_column_name FROM user_constraints A,user_cons_columns B,user_constraints C,user_cons_columns D WHERE A.r_constraint_name=C.constraint_name AND A.constraint_name=B.constraint_name AND C.constraint_name=D.constraint_name AND A.constraint_type='R'; Select * From fkview; Select * From fkview Where table_name='EVENT'; Only a "simple" view can do DML. simple if only from one table, no functions, no group by, no distinct --can not do DML: WITH READ ONLY CONSTRAINT constraint_name --Inserts or Updates must abide by view definition: WITH CHECK OPTION CONSTRAINT constraint_name