ODBC Server Reference Manual

Transact-SQL Language
HP NonStop ODBC Server Reference Manual429151-002
4-72
Examples
Examples
The following statement drops a view owned by PAYROLL_MGR and one owned by
PAYROLL_ADMIN:
use test_disk01_persnl
drop view payroll_mgr.emplist,
payroll_admin.mgrlist
Dropping Dependent Views and Indexes
You should drop dependent views and indexes before dropping a view using the
NonStop ODBC Server.
When you drop a view using the NonStop ODBC Server, NonStop SQL/MP drops the
view and all dependent views and indexes. The NonStop ODBC Server, however, does
not clear the mapping table entries for the views or indexes.
The only way to clear the mapping table entries in this situation is to run the catalog
utility statement REFRESH.
For information on REFRESH, see Maintaining Catalogs on page 7-27.
NonStop ODBC Server Compared With SQL Server
When used through the NonStop ODBC Server, DROP VIEW differs from the SQL
Server implementation in the following ways:
Note. When the mapping table entries are not cleared and you later attempt to create a view
or index by the same name, you will receive error messages saying that the object already
exists when in fact it does not.
Feature In SQL Server
In Programs Used With the
NonStop ODBC Server
Can DROP VIEW be inside a
transaction?
No Yes
See DDL Statements Allowed
in User-Defined Transactions
on page 4-3.