Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2010
    Posts
    67

    Unanswered: Insert into table

    Hello everybody,

    I have a question,

    db2 v7.2 on aix 4.3

    I am going to use "insert into new_table select * from orig-table"

    orig-table has 2 columns with default values in definition and one column with CLOB type (267456) size.

    1- I have read some where that default values will not copy to New_table. I tested myself and I saw insert into command copied default values .what do you think, do you anything about that?

    2- is there any restriction to copy CLOB column with insert into command. it is production and I am worry about data integrity.

    Thank you in advance for your help

  2. #2
    Join Date
    Jan 2010
    Posts
    67
    any comments!!

  3. #3
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    The Insert will insert the current values for the columns regardless whether they are a default value or not. Default values are only for supplying values on an insert when a column is not identified during the insert.

    There should not be any restriction on the clob. You will need to take into account the log space needed for the insert since you are doing all the rows in a single statement.

    Andy

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    DB2 V7.2 is quite old. All documentation regarding that release was destroyed during the War of 1812 when the British burned Washington DC to the ground.
    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
  •