Deletes one or more view definitions. When the DELETE VIEW statement executes, Oracle Rdb deletes the view definition from the physical database and the data dictionary. You cannot delete a view if other views refer to it. You can delete a view definition when there are other users attached to the database. Example: RDO> DELETE VIEW CURRENT_SALARY.
1 – Format
(B)0[m[4mDELETE[m [4mVIEW[m qqqqwqqq> view-name qqqqqwqqq> . mqqqqqqqqq , <qqqqqqqj
1.1 – view-name
The name of the view definition you want to delete.
2 – Examples
Example 1 Delete a single view definition: RDO> INVOKE DATABASE PATHNAME "PERSONNEL" RDO> START_TRANSACTION READ_WRITE RDO> DELETE VIEW CURRENT_INFO. RDO> COMMIT This statement deletes the view definition from the physical database and the data dictionary. Example 2 Delete more than one view definition: RDO> INVOKE DATABASE PATHNAME "PERSONNEL" RDO> START_TRANS READ_WRITE RDO> DELETE VIEW CURRENT_JOB. %RDMS-F-VIEWINVIEW, view, CURRENT_JOB, is referenced by view, CURRENT_INFO -RDMS-F-VIEWNOTDEL, view, CURRENT_JOB, has not been deleted RDO> DELETE VIEW CURRENT_INFO. RDO> DELETE VIEW CURRENT_SALARY. RDO> DELETE VIEW CURRENT_JOB. RDO> SHOW RELATIONS User Relations in Database with filename PERSONNEL COLLEGES DEGREES DEPARTMENTS EMPLOYEES JOBS JOB_HISTORY RESUMES SALARY_HISTORY WORK_STATUS RDO> COMMIT This sequence shows how to delete a set of views, some of which depend on others. In this case CURRENT_INFO is a view definition that combines fields from two other views, CURRENT_JOB and CURRENT_SALARY.
3 – More
To delete a view with the DEFINE VIEW statement, you must have the Oracle Rdb DELETE privilege to the view. You must execute this statement in a read/write transaction. If there is no active transaction and you issue this statement, Oracle Rdb starts a read/write transaction implicitly. Deleting a view does not affect other users until you commit your transaction, and users detach from the database and attach again.