Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to remove unwanted columns from the defined table.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
vasanthkumarhb

Active User


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

PostPosted: Thu Jan 03, 2008 11:58 am    Post subject: How to remove unwanted columns from the defined table.
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    Post subject: Reply to: How to remove unwanted columns from the defined ta
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    Post subject:
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    Post subject: Hi
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: 276
Location: Bang,iflex

PostPosted: Fri Jan 04, 2008 9:51 am    Post subject:
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

Senior Member


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

PostPosted: Fri Jan 04, 2008 1:06 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us