Re: How can I drop a column from a table?
From: M Rajeshwar <MR1154_at_CAMBER.COM>
Date: 1996/07/29
Message-ID: <31FCEC67.50F6_at_CAMBER.COM>#1/1
Date: 1996/07/29
Message-ID: <31FCEC67.50F6_at_CAMBER.COM>#1/1
Jarmo Tuominen wrote:
>
> What is the best way to drop a column from the table? Is there any command for this?
>
> Jarmo Tuominen
Assume you have a table TABLE with columns c1,c2 and c3, and that you want to delete column c2.
Create a temporary table temptab as
CREATE TABLE TEMPTAB AS SELECT C1,C3 FROM TAB; Drop the original table TABLE as, DROP TABLE TABLE;
Rename this temporary table back to its original as, RENAME TEMPTAB TO TABLE; So, that will leave the table TABLE with one column deleted !!!
Any other suggestions are highly welcome.
Raj Received on Mon Jul 29 1996 - 00:00:00 CEST