Results 1 to 2 of 2
  1. #1
    Join Date
    May 2010

    Unanswered: Insert into a table with identity col


    I have to select cols from a table and insert into another table which is having col integer generated always as identity.

    for example T1 has 5 cols.T2 has same 5 cols + identity col.

    What would be the syntax.

    I am trying the following but not working

    db2 "insert into dev04.identity2 (Select HSN,C3,C4 from dev04.identity1)"

    Can anyone give me the right syntax...


  2. #2
    Join Date
    Jun 2003
    Toronto, Canada
    Provided Answers: 1
    I think you should get used to specifying columns that you want to insert into. Correct syntax can be found in the manual.

Posting Permissions

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