IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
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
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: Canada

PostPosted: Thu May 24, 2007 11:37 am
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
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: Canada

PostPosted: Thu May 24, 2007 12:32 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top