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
 

 

Adding a column (M) to table A using ALTER command

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
pingte

Active User


Joined: 03 Dec 2005
Posts: 120
Location: india

PostPosted: Thu May 24, 2007 11:19 am    Post subject: Adding a column (M) to table A using ALTER command
Reply with quote

i have a Table A with 4 cols : X,Y,Z,B

Now i am adding a column (M) to table A using ALTER command.

Criteria for insertion:
Columun M should be inserted between Z and M.

How can this be acheived? icon_eek.gif

TIA,
Pingte
Back to top
View user's profile Send private message

muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Chennai

PostPosted: Thu May 24, 2007 11:37 am    Post subject: Re: DB2 question
Reply with quote

Quote:
Columun M should be inserted between Z and M.
icon_confused.gif

I think you want to say as M should be inserted between Z and B.

If that is the case,there is no point or no need of inserting between two columns.
Wherever you insert the column,it is going to be one row for a key record.Moreover you are going to use the column by it's dclgen .
Back to top
View user's profile Send private message
pingte

Active User


Joined: 03 Dec 2005
Posts: 120
Location: india

PostPosted: Thu May 24, 2007 11:41 am    Post subject:
Reply with quote

Quote:

Columun M should be inserted between Z and B.



I just want to know whether it is feasible or not?
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Chennai

PostPosted: Thu May 24, 2007 12:32 pm    Post subject: Re: Adding a column (M) to table A using ALTER command
Reply with quote

The answer is NO.
Back to top
View user's profile Send private message
deepak.vl

New User


Joined: 17 Feb 2007
Posts: 38
Location: Hyderabad

PostPosted: Sun May 27, 2007 7:16 pm    Post subject:
Reply with quote

Hi,
In this case you may have to take the back up of the table data into another table/tape drive, drop the table, create the table with the new column between Z & B, load the new table with the backed up data.
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am


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