Re: Tool to drop Columns

From: Tim Hall <tim.hall_at_spambuster.com>
Date: 1997/10/16
Message-ID: <3445f12f.10083739_at_69.0.9.9>#1/1


On 15 Oct 1997 15:29:38 GMT, jlove_at_engin.umich.edu (Jacob Love) wrote:

>In article <01bcd941$f6fdefb0$54110b87_at_clamagent>,
>Dan Clamage <clamage_at_mime.dw.lucent.com> wrote:
>>Why not just do
>>1) CREATE new_table AS SELECT col1, col3, colN FROM old_table;
>>2) DROP TABLE old_table;
>>3) RENAME new_table TO old_table;
>
>Because this doesn't take care of grants, indexes, primary and foreign
>keys. If you have an extraordinarily simple system which doesn't take
>advantage of referential integrity, the solution you propose would
>work.

Of course, in an ideal world, you would have maintained all the creation scripts for indexes and constraints anyway. It would just be a matter of re-running them. Grants might still be a problem, though.



Tim Hall, Indus International

http://www.tswi.com
http://www.indusgroup.com

Replace "spambuster" with "tswi" before replying via email Received on Thu Oct 16 1997 - 00:00:00 CEST

Original text of this message