When a materialized view is no longer needed, you can drop it.
Before you can drop a materialized view, you must drop or disable all dependent views. To determine whether there are views dependent on a materialized view, use the sa_dependent_views system procedure. See sa_dependent_views system procedure.
See also View dependencies.
Connect to the database as a user with DBA authority, or as the owner of the view.
In the left pane, double-click Views.
Right-click the materialized view and choose Delete.
Click Yes.
Connect to the database as a user with DBA authority, or as the owner of the view.
Execute a DROP MATERIALIZED VIEW statement.
The following statement creates the EmployeeConfid4 materialized view, initializes it (populates it with data), and then drops it.
CREATE MATERIALIZED VIEW EmployeeConfid4 AS SELECT EmployeeID, Employees.DepartmentID, SocialSecurityNumber, Salary, ManagerID, Departments.DepartmentName, Departments.DepartmentHeadID FROM Employees, Departments WHERE Employees.DepartmentID=Departments.DepartmentID; REFRESH MATERIALIZED VIEW EmployeeConfid4; DROP MATERIALIZED VIEW EmployeeConfid4; |
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |