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

SQL Anywhere 11.0.1 » UltraLite - Database Management and Reference » Using UltraLite Databases » Working with UltraLite databases » Working with UltraLite tables and columns


Deleting UltraLite tables

You can drop any table provided that the table:

  • Is not being used as an article in a publication.

  • Does not have any columns that are referenced by another table's foreign key.

In these cases, you must change the publication or delete the foreign key before you can successfully delete the table.

You can use either Sybase Central or Interactive SQL to perform this task.

Sybase Central

In Sybase Central, you can perform these tasks while working with a selected table.

To delete an UltraLite table (Sybase Central)
  1. Connect to the UltraLite database.

  2. In the left pane, double-click Tables.

  3. Right-click a table and choose Delete.

  4. Click Yes.

Interactive SQL

In Interactive SQL, deleting a table is also called dropping it. You can drop a table by executing a DROP TABLE statement.

To delete an UltraLite table (Interactive SQL)
  1. Connect to the UltraLite database.

  2. Execute a DROP TABLE statement.

    For example, the following DROP TABLE statement deletes all the records in the Skills table and then removes the definition of the Skills table from the database:

    DROP TABLE Skills;

    Like the CREATE statement, the DROP statement automatically executes a COMMIT statement before and after dropping the table. This statement makes all changes to the database since the last COMMIT or ROLLBACK permanent. The DROP statement also drops all indexes on the table.

See also