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.
To drop a materialized view (Sybase Central)
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.
To drop a materialized view (SQL)
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; |
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |