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
 
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 OUTREC with ALter Command scorp_rahul23 DFSORT/ICETOOL 1 Wed Nov 22, 2017 3:10 pm
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 MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm

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