<< Click to Display Table of Contents >>

Drop column

Top Previous Next

The operation gives the database administrator support in dropping a column from a table:

Oracle server version 8.1.5 or later (Oracle 8i) supports dropping columns. After displaying a confirmation message box, Hora executes the SQL statement ALTER TABLE DROP COLUMN.

However, Oracle does not provide support in dropping columns for server version 7 and 8.0. You must create a new table structure without the appropriate column and copy the data manually. All constraints, comments and triggers should be re-created on the new structure. Hora automates this procedure.

This modal dialog provides for the following options:

Data from the original table is saved in a temporary table. You can change the default table name HORA_TEMPORARY to any other valid identifier.

Perform the operation (yes/no). If this option is not checked, Hora allows you to create a script only.

Commit each insert option. When copying significant amounts of data, you can prevent rollback segment problems by adding a commit after each insert operation.

Disable constraints. If checked, Hora does not enable constraints after the column has been dropped. You need to do this manually.

Save script to file. You can enter a valid file name. Hora lets you create a script only if the perform option is not checked.

The combination of these checkable options lets you choose between

Performing the operation immediately on your database (this is irreversible, but you can watch the procedure if the Extras | SQL Preview menu item has been checked.),

Generating a SQL script file only or

Doing both.

First, all constraints, indexes, triggers and privileges owned or referenced by the table are dropped. These will be re-created later if possible. The table's rows are saved in the temporary table that you have specified in this dialog. Finally, the rows are copied back from the temporary table.

PL/SQL objects and views will not be updated by the procedure. Please check them manually for errors after the procedure has completed.

Although the process is very safe, we recommend that you back up your database completely before performing the operation in order to avoid loss of data in the event of a system crash or other unexpected circumstances.