The remove statement removes registrations of tables, views, and database procedures from your distributed database. An object that is removed by the remove statement remains intact in the underlying local database, but is no longer identified to Ingres Star.
Local objects are registered by you with the register as link statement. You use the remove statement to remove these registrations. Only the registration is deleted. The local objects are not affected.
When you use the create table statement at the Ingres Star level, the table is automatically registered in your distributed database. You can use remove to delete these automatic registrations also. The underlying table remains.
You can execute the remove statement through dynamic SQL by the prepare/execute, and execute immediate statements.
The remove statement deletes only the registration residing in the Ingres Star catalogs. The table or view in the local DBMS is not affected.
You cannot remove an index with the remove statement.
You cannot remove a distributed view with the remove statement. You must use the drop statement to delete a distributed view.
The remove statement has the following forms:
If the type of object is not specified, Ingres Star assumes it is a table or view. The keyword procedure must be given to remove a procedure name.
The remove table statement removes from the Ingres Star catalogs table definitions that were manually registered using register table as link, or which were automatically registered using create table at the Ingres Star level.
The local DBMS table itself is not changed, but all the Ingres Star catalog definitions are deleted, including any related view or index definitions.
The remove table statement has the following format:
remove [table] table_name
Is an optional object identifier. If you do not specify table, the registration of table_name is deleted whether the object is a table or a view. If table is specified, the object named must be a table.
Is the registered Ingres Star name of the table. It may be delimited with double quotes.
To remove the registration of a table named west_prospects from your distributed database, use the statement:
remove table west_prospects;
To remove the registration named usa sales, delimit the table name. Use delimited identifiers only if you used them on the corresponding register statement:
remove table "usa sales";
The remove view statement removes from the Ingres Star catalogs view definitions that were registered using register view as link.
The remove view statement has the following format:
remove [view] view_name
Is an optional object identifier. Whether or not you specify view, Ingres Star queries the local DBMS and determines the object type.
If you do not specify view, view_name is deleted whether the object is a table or a view. If view is specified, the object named must be a view.
Is the registered Ingres Star name of the view. It may be delimited with double quotes.
To remove the registration of a view named usa_visits from your distributed database, use the statement:
remove view usa_visits;