View previous topic :: View next topic
|
Author |
Message |
vasanthkumarhb
Active User
Joined: 06 Sep 2007 Posts: 275 Location: Bang,iflex
|
|
|
|
Hi all,
I need to know, How to remove the unwanted columns from already defined Table |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
afaik...you'll need to drop the table and create it again without all those columns... maybe in the latest version of db2 exist a drop column? |
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 632 Location: Wisconsin
|
|
|
|
If you are on the latest version of DB2 I believe the ALTER command can do this. Have you looked in the manuals? They are linked at the top of every page, little white letters on a gray background, says "Manuals"? |
|
Back to top |
|
|
mkk157
Active User
Joined: 17 May 2006 Posts: 310
|
|
|
|
Hi Vasanth Kumar,
As stodolas told that it works with the latest version of the DB2.
try this command
ALTER TABLE tablename
DROP COLUMN fieldname |
|
Back to top |
|
|
vasanthkumarhb
Active User
Joined: 06 Sep 2007 Posts: 275 Location: Bang,iflex
|
|
|
|
Hi All,
Thank you very much for your time guys. Next time will see the manuals |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Did you get the solution ? Care to share? |
|
Back to top |
|
|
|