Altova DatabaseSpy 2025 Professional Edition

Dropping Database Objects

Home Prev Top Next

Database objects can be dropped from various contexts:

 

From the Online Browser

From the Design Editor

By generating a DROP statement in the SQL Editor

 

Note that SQLite and DB2 for i databases do not support altering the structure of an existing table by dropping columns. For such databases, the commands for dropping a column are disabled in DatabaseSpy.

 

From the Online Browser

To drop a database object:

 

1.Do one of the following:

 

In the Online Browser, right-click a database object and select Delete from the context menu.

In the Online Browser, select one or more database objects and press Delete.

 

DatabaseSpy generates the required script and displays it in the Database Structure Change Script window, for example:

dbs_delete_object
Note:At this stage, the changes are not committed to the database yet. In the Online Browser, the icon dbs_ic_deleted_table appears to the left of the object name, which indicates that you are about to delete it. To undo the drop operation without committing it to the database, click Refresh data source Refresh (F5) in the Online Browser.

 

2.Optionally, to modify the generated script before running it, click the Edit Change Script Edit Change Script button.

3.In the Database Structure Change Script window, click Execute Change Script dbs_ic_execute_script.

 

From the Design Editor

To drop a database object:

 

1.Do one of the following:

 

In the Design Editor, right-click a database object and choose Delete selected Objects from the context menu.

In the Design Editor, select one or more database objects and press Delete.

 

DatabaseSpy generates the required script and displays it in the Database Structure Change Script window. Also, the icon dbs_ic_deleted_table appears to the left of the object name, which indicates that you are about to delete it (in the image below, a table is about to be deleted).

dbs_delete_object_from_design
Note:At this stage, the changes are not committed to the database yet. To undo the delete operation without committing it to the database, click Refresh data source Refresh (F5) in the Online Browser.

 

2.Optionally, to modify the generated script before running it, click the Edit Change Script Edit Change Script button.

3.In the Database Structure Change Script window, click Execute Change Script dbs_ic_execute_script.

 

By generating SQL

To drop a database object by generating a DROP statement:

 

1.In the Online Browser, right-click a database object and select Show in new SQL Editor | Drop from the context menu.

2.Click the Execute dbs_ic_execute_script button at the top of SQL Editor (or press F5). The outcome is reported in the Message window.

© 2018-2024 Altova GmbH