View previous topic :: View next topic
|
Author |
Message |
chagoyal
New User
Joined: 03 May 2007 Posts: 11 Location: India
|
|
|
|
How can I drop an existing column (non key not null with default) from a table without dropping the table..
Please advice ..! |
|
Back to top |
|
|
chagoyal
New User
Joined: 03 May 2007 Posts: 11 Location: India
|
|
|
|
I forgot to mention I am using db2 v8.1 |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
chagoyal wrote: |
How can I drop an existing column (non key not null with default) from a table without dropping the table..
Please advice ..! |
You can't. |
|
Back to top |
|
|
mbr_raja
New User
Joined: 15 Nov 2004 Posts: 26 Location: Chennai, India
|
|
|
|
There is no option to drop a specific column from table. The only option to change the table structure is to drop the specific table and recreate the new table with new definition. |
|
Back to top |
|
|
ksk
Active User
Joined: 08 Jun 2006 Posts: 355 Location: New York
|
|
|
|
Hi,
You can't drop a column from the table. If you want to delete a column form the table, DECLARE a new table with all columns except the column that you want to delete and insert the existing data into this new table. And now drop the old table.
Hope this helps.
KSK |
|
Back to top |
|
|
|