Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Location
    chennai
    Posts
    1

    Unanswered: How to Disable the sequence number with existing Table

    Hi guys,
    I am new to DB2. I am working on the project of data migration. we have a requirement of data migration on everyday basis.

    Table yyyy which has auto generation column like

    CREATE TABLE yyyy (acc_Number INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1, NO CACHE),....

    my question is, I wanted to disable/drop the auto generation key on "acc_Number" before doing insertion. Then after insertion i have to enable/recreate the generated key on the same "acc_Number" field.

    Reply to this posting is highly appreciated.

    with regards,
    Bala

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: How to Disable the sequence number with existing Table

    Refer to SET INTEGRITY statement in SQL Reference ..

    Your statement may look like

    SET INTEGRITY FOR yyyy OFF

    HTH

    Cheers
    Sathyaram
    Originally posted by Balasubramanim
    Hi guys,
    I am new to DB2. I am working on the project of data migration. we have a requirement of data migration on everyday basis.

    Table yyyy which has auto generation column like

    CREATE TABLE yyyy (acc_Number INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1, NO CACHE),....

    my question is, I wanted to disable/drop the auto generation key on "acc_Number" before doing insertion. Then after insertion i have to enable/recreate the generated key on the same "acc_Number" field.

    Reply to this posting is highly appreciated.

    with regards,
    Bala
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

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