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 Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am


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