>>Now, I want to delete a few columns from the data definition itself.
>>I see that either ALTER TABLE or DROP would not work. Can somebody
>>please help me with this?
>>University of Kansas, Lawrence off: (913) 864-7374
>Whenever you create a table, store the SQL so you can reuse it.
>We ALWAYS store the SQL used to create a table. In the development of
>a new system, it is a regular occurrence that columns are added or
>dropped, keys and constraints are changed, storage parameters are
>It is a simple matter, to edit the SQL to create the table, and then
>run a batch (background) job to drop and re-create the table.
>The same job can be run by several developers of the system, so they
>each have a current version of the table to use in thier testing
>Hope this helps.
I agree with this but...
If you're working with live data, add to your *.SQL script to;
rename current to old, create new, recreate indexes, regrant privilages,
INSERT INTO new SELECT matching_columns FROM old;
DON'T DROP THE OLD TABLE for 6 months to 1 year.
You may need the (now) discarded data
once the users changes their minds again.
As an alternative...
create a table with the unique key column and the deleted column(s).
Then you can drop the old table, with duplicated (now) data.