Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2009
    Posts
    18

    Question Unanswered: merge two tables in one table

    Hey Guys,
    How should I merge 2 tables in one? My first table is ~65GB and it's tablespace is full and the second one is ~2GB. I've created a new large tablespace and want to merge these 2 tables in one table.

    DB2 9.5 linux x86_64

  2. #2
    Join Date
    Jan 2009
    Location
    Zoetermeer, Holland
    Posts
    746
    my appoach would be:
    Code:
    create table3 like table1 in new_tablespace
    declare XYZ cursor for select * from table1 union all select * from table2
    load from XYZ of cursor insert into table3 nonrecoverable
    backup new_tablespace
    Do not forget to make a backup first.
    Somewhere between " too small" and " too large" lies the size that is just right.
    - Scott Hayes

  3. #3
    Join Date
    Nov 2009
    Posts
    18
    I did it same way, thanks for reply

  4. #4
    Join Date
    Nov 2009
    Posts
    18
    I did it same way, thanks for reply

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •