Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us