Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 » SQL Anywhere Server - SQL Reference » Using SQL » SQL statements » SQL statements (A-D)


DROP VIEW statement

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.

Side effects

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.

See also
Standards and compatibility
  • SQL/2003   Core feature.


Drop MyView from the database. If the view does not exist, an error is returned.