/*View view is a table view constructed from several base tables and/or other views that are stored in query statements and do not have real data virtual tables that restrict manipulation of data Complex queries are simpler to provide different displays of the same data union all is added directly together and the Union is added together and the deduplication*/--give Scott users permission to create viewsSqlplus/ assysdba;GRANT CREATE VIEW toSCOTT;--Create a View CREATE OR REPLACE VIEWv_emp as SELECT * fromEmpWHEREEname like '%a%' UNION All SELECT * fromEmpWHEREEname like '%s%' UNION All SELECT * fromEmpWHERESAL>= the; CREATE OR REPLACE VIEWv_emp as SELECT * fromEmpWHEREEname like '%a%' UNION SELECT * fromEmpWHEREEname like '%s%' UNION SELECT * fromEmpWHERESAL>= the;--Delete a view DROP VIEWv_emp; /*sequence a series of successive increments*/--Create a sequenceCREATESEQUENCE SEQ_BJSXT START with 20001INCREMENT by 2MAXVALUE99999999MINVALUE1CYCLE CACHE ---Delete a sequenceDROPSEQUENCE SEQ_BJSXT; --Query SeriesSELECTSEQ_BJSXT. Nextval fromDUAL; /*index gluttonous A dictionary-like index greatly improves the query performance index of a database to account for separate storage space, which may cause the index data to be significantly larger than the real data index if it is not properly established. Change Performance*/SELECTE.*, ROWID fromEMP E;--Create an index CREATE INDEXIdx_emp_ename onEMP (ename);
ORACLE CREATE VIEW index sequence