Help needed on insert



IBM's flagship relational database management system

Help needed on insert

Postby pcdoctor » Mon Apr 14, 2008 9:09 pm

I have a Table say Table A..I need to copy the records of this table into another Table B using a single insert..Both tables have same no.of columns and of same data type..Is it possible using a single insert to pick up data from table A and copy it in table B??Plz provide some suggestions as to how this could be implemented..
pcdoctor
 
Posts: 17
Joined: Mon Feb 18, 2008 10:21 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Help needed on insert

Postby CICS Guy » Mon Apr 14, 2008 9:56 pm

pcdoctor wrote:I have a Table say Table A..I need to copy the records of this table into another Table B using a single insert..Both tables have same no.of columns and of same data type..Is it possible using a single insert to pick up data from table A and copy it in table B??Plz provide some suggestions as to how this could be implemented..
It looks like it, take a look at the INSERT and
fullselect - The number of columns in the result table must be equal to the number of names in the column list and the columns that are identified in the INCLUDE clause. The value of the first column of the result is inserted in the first column in the list, the second value in the second column, and so on.
CICS Guy
 
Posts: 246
Joined: Wed Jun 20, 2007 4:08 am
Has thanked: 0 time
Been thanked: 0 time

Re: Help needed on insert

Postby pcdoctor » Mon Apr 14, 2008 10:16 pm

Hey Cics guy iam very much thankful to u..Insert with select matches my exact need..!!!
pcdoctor
 
Posts: 17
Joined: Mon Feb 18, 2008 10:21 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post