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

SQL Anywhere 12.0.1 » SQL Anywhere Server - SQL Usage » Tables, views, and indexes » Tables » Table alteration


Dropping a table

You can use Sybase Central to drop a table from your database, for example, when you no longer need it.


You must be the owner of the table or have DBA authority.

You cannot drop a table that is being used as an article in a publication. If you try to do this in Sybase Central, an error appears. Also, if you are dropping a table that has dependent views, there may be additional steps to make, as noted in the following sections.

Dropping tables fails if there are any dependent materialized views; you must first disable dependent materialized views.

Use the sa_dependent_views system procedure to determine if there are dependent materialized views.

Context and remarks


 Drop a table using Sybase Central
  1. Connect to the database using the SQL Anywhere 12 plug-in

  2. Double-click Tables.

  3. Right-click the table and click Delete.

  4. Click Yes.


When you drop a table, its definition is removed from the database. If there are dependent regular views, the database server attempts to recompile and re-enable them after you perform the table alteration. If it cannot, it is likely because the table deletion invalidated the definition for the view. In this case, you must correct the view definition.

If there were dependent materialized views, subsequent refreshing will fail because their definition is no longer valid. In this case, you must drop the materialized view and then create it again with a valid definition.

All indexes on the table are dropped.

Dropping a table causes a COMMIT statement to be executed. This makes all changes to the database since the last COMMIT or ROLLBACK permanent.


Dependent regular or materialized views must be dropped, or have their definitions modified to remove references to the dropped table.

 See also