IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to remove unwanted columns from the defined table.


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 275
Location: Bang,iflex

PostPosted: Thu Jan 03, 2008 11:58 am
Reply with quote

Hi all,

I need to know, How to remove the unwanted columns from already defined Table
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Thu Jan 03, 2008 12:56 pm
Reply with quote

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
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Thu Jan 03, 2008 6:15 pm
Reply with quote

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
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Thu Jan 03, 2008 7:20 pm
Reply with quote

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
View user's profile Send private message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 275
Location: Bang,iflex

PostPosted: Fri Jan 04, 2008 9:51 am
Reply with quote

Hi All,

Thank you very much for your time guys. Next time will see the manuals
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Jan 04, 2008 1:06 pm
Reply with quote

Did you get the solution ? Care to share?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Remote Unload of CLOB Columns DB2 6
No new posts Multiple table unload using INZUTILB DB2 2
Search our Forums:

Back to Top