Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2012
    Posts
    5

    Unanswered: How to create a temp table as replica of original table

    Hi,

    I have earlier taken snap shot of tables in temp tables in oracle using following comand

    Code:
    create table tablename1 as select * from table
    Now i want to take snapshot of table in db2. Searched for few commands but could not find anything equivalent to above command in oracle.

    Also is there a default temp schema in db2 where all developers will have access to create temp table.

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    For the first question, check the CREATE TABLE xxxxx LIKE syntax in the manual.

    For the second, look up Created Global Temporary Tables (CGTTs), a new feature in DB2 LUW 9.7. The schema name does not matter, as schema has a different meaning in DB2 than in Oracle.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

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