Copy one table to another

Ask question on - DataBase Concepts, IBM Mainframe DB2, DB2/UDB, DB2 Tools, SQL , DB2 programming with languages like COBOL, PL1.

Moderators: Kalicharan, Moderator Group

Post Reply
aravindan333
Member
Posts: 10
Joined: Wed Dec 07, 2011 11:42 am

Copy one table to another

Post by aravindan333 » Mon Apr 30, 2012 5:01 pm

please help me on this scenario

There are two tables A and B

Table A is having 20 columns and table B is having same 20 columns as of table A and an additional 4 columns,

I should copy the values of table A to table B,
Will i be able to do so, If yes can i able to get the query for this?

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Mon Apr 30, 2012 6:19 pm

what values are to be populated in the 'extra' 4 columns in table b?
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Mon Apr 30, 2012 9:09 pm

Do both tables have the same key/index definition(s)?
Have a good one

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others