Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

Format

Examples

More

view-name

RDB/VMS Relational Database Operator DELETE_VIEW — VMS RDB_4.2

 Deletes one or more view definitions.  When the DELETE VIEW statement
 executes, Rdb/VMS 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.

Additional information available:

FormatExamplesMore

Format

 DELETE VIEW ────┬───> view-name ─────┬───> .
                 └───────── , <───────┘

Additional information available:

view-name

view-name

 The name of the view definition you want to delete.

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.

More

 To delete a view with the DEFINE VIEW statement, you must have the
 Rdb/VMS 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, Rdb/VMS
 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.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026