Results 1 to 5 of 5

Thread: Alter Table

  1. #1
    Join Date
    Feb 2002
    Location
    Minneapolis, MN
    Posts
    253

    Unanswered: Alter Table

    Sorry about the easy and post but missing something easy I'm sure:

    alter table amrobi2.testprod alter column column1 INTEGER generated always as identity (start with 10, increment by 12)

    Could someone tell me what's wrong with this thing?

    Thanks!

    AMR
    Anthony Robinson

    "If I'm curt with you, it's because time is a factor here. I think fast, I talk fast, and I need you guys to act fast if you want to get out of this. So, pretty please - with sugar on top..."

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    I doubt if you can change an 'ordinary' int column to an identity column

    In any case, SQL Reference should help

    Cheers
    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Feb 2002
    Location
    Minneapolis, MN
    Posts
    253
    The column is already an IDENTITY column. I need to LOAD data into a table and then restart the count at MAX(IDENTITY +1)...

    Checked SQL reference but to no avail...
    Anthony Robinson

    "If I'm curt with you, it's because time is a factor here. I think fast, I talk fast, and I need you guys to act fast if you want to get out of this. So, pretty please - with sugar on top..."

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    My SQL Reference says
    ALTER TABLE amrobi2.testprod alter column column1 restart with 10
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  5. #5
    Join Date
    Feb 2002
    Location
    Minneapolis, MN
    Posts
    253
    Very cool!!

    Thank you - I had seen something a tad bit different...
    Anthony Robinson

    "If I'm curt with you, it's because time is a factor here. I think fast, I talk fast, and I need you guys to act fast if you want to get out of this. So, pretty please - with sugar on top..."

Posting Permissions

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