RDB/VMS SQL DROP — VMS SQLdev_2.0
Deletes definitions from a database or deletes an entire schema.
Additional information available:
DATABASEDOMAININDEXPATHNAMESCHEMASTORAGE_MAP
TABLEVIEW
DATABASE
DROP DATABASE is supported only for upward compatibility. For information on dropping databases see the Help topic on DROP SCHEMA.
DOMAIN
DROP DOMAIN --> domain-name --> ;
Additional information available:
More Information
Deletes a domain definition. When the DROP DOMAIN statement executes, VAX SQL drops the domain definition from the physical database. If you declared the schema using the PATHNAME qualifier, VAX SQL also drops the domain definition from the data dictionary. You can drop any named domain once you have declared the schema that includes the domain. However, you cannot drop a domain that is referred to in a column definition in a table. If you want to drop a domain that is referred to in a column definition, you must first drop the column definition using the ALTER TABLE statement. If the column definition is used in a constraint or index definition, you must first drop the constraint or index definition, then drop the column definition.
INDEX
DROP INDEX index-name ----> ;
Additional information available:
More Information
DROP INDEX deletes the specified index definition. When the DROP INDEX statement executes, SQL deletes the index definition from the schema. If you declare the schema using the PATHNAME qualifier, SQL also deletes the index definition from the data dictionary. You cannot delete an index definition unless you have declared the schema that includes the index. You also cannot delete an index when there are other users who have declared the same schema. You must execute this statement in a READ WRITE transaction.
index name
The name of the index definition you want to delete.
PATHNAME
DROP PATHNAME --> path-name--> ;
Additional information available:
More Information
Deletes the data dictionary definitions specified by the pathname argument. It does not delete the physical database files.
SCHEMA
DROP SCHEMA --+-> AUTHORIZATION auth-id -+-> ;
+-> FILENAME file-spec ----+
+-> PATHNAME path-name ----+
Additional information available:
More Informationauth idfile specpath name
More Information
DROP SCHEMA deletes a schema. When this statement executes, SQL
deletes all the database files associated with the schema. If you
specify a data dictionary path name in the DROP SCHEMA statement, SQL
also deletes the data dictionary directory that contains the schema
definitions.
NOTE
Use the DROP SCHEMA statement with care. You cannot
use ROLLBACK to cancel a DROP SCHEMA statement. When
you use this statement, SQL deletes all database
files, which includes all data and all definitions.
auth id
The authorization identifier of an already-declared schema.
file spec
A full or partial file specification that names the database files. If you use a partial file specification, SQL uses the standard VMS defaults. If you use a file specification, DROP SCHEMA only deletes database files, whether or not there is also a data dictionary directory containing schema definitions.
path name
A full or relative data dictionary path name for the dictionary directory where the schema definitions are stored. Use a path name instead of a file specification to delete the data dictionary definitions for the schema from the data dictionary along with the database files.
STORAGE_MAP
DROP STORAGE MAP --> map-name --> ;
Additional information available:
More Information
Deletes the specified storage map definition. Do not use the DROP STORAGE MAP and CREATE STORAGE MAP statements to change a storage map. Use the ALTER STORAGE MAP statement instead. You cannot delete a storage map if you have declared the schema that includes the storage map. You also cannot delete a storage map when other users have declared the same schema.
TABLE
DROP TABLE table-name -----> ;
Additional information available:
More Information
DROP TABLE deletes the table definition specified. When the DROP TABLE statement executes, SQL deletes the table definition and the data stored in that table from the database. If you use the PATHNAME qualifier when you declare the database, DROP TABLE also deletes the table definition from the data dictionary. You must execute the DROP TABLE statement in a READ WRITE transaction. If you issue this statement when there is no active transaction, SQL starts a transaction with characteristics specified in the most recent DECLARE TRANSACTION statement. You cannot delete a table definition unless you have declared the schema that includes the table. Also, you cannot delete a table when there are other users who have declared the schema. SQL automatically deletes any index or view definitions that refer to a table when it deletes the table definition.
table name
The name of the table definition you want to delete.
VIEW
DROP VIEW view-name ---> ; DROP VIEW deletes the specified view definition. When the DROP VIEW statement executes, SQL deletes the view definition from the physical database. If you declare the schema using the PATHNAME qualifier, SQL also deletes the view definition from the data dictionary. You can delete a view definition even when there are active users. Deleting a view definition does not affect active users until you commit your transaction, and they exit their session and declare the database again. SQL automatically deletes any views that refer to the view named in the DROP VIEW statement. You must execute this statement in a READ WRITE transaction. If you issue this statement when there is no active transaction, SQL starts a transaction with characteristics specified in the most recent DECLARE TRANSACTION statement.
Additional information available:
view name
The name of the view definition you want to delete.