Use this statement to remove a view from the database.
DROP VIEW [ IF EXISTS ] [ owner.]view-name
Use the IF EXISTS clause if you do not want an error returned when the DROP VIEW statement attempts to remove a view that does not exist.
When you execute the DROP VIEW statement, the status of all dependent regular views change to INVALID. To determine view dependencies before dropping a view, use the sa_dependent_views system procedure. See sa_dependent_views system procedure.
Any user who owns the object, or has DBA authority, can execute the DROP VIEW statement.
Automatic commit. Clears the Results tab in the Results pane in Interactive SQL. Executing a DROP VIEW statement closes all cursors for the current connection.
When a view is dropped, all procedures and triggers are unloaded from memory, so that any procedure or trigger that references the view reflects the fact that the view does not exist. The unloading and loading of procedures and triggers can affect performance if you are regularly dropping and creating views.
SQL/2003 Core feature.
Drop MyView from the database. If the view does not exist, an error is returned.
DROP VIEW MyView; |
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |