Skip to Content
avatar image
Former Member

Auto increment for Primary Key in Powerdesigner

Hello,

I am creating a data model in power designer. Could you please help me on auto increment for a PK column. I am trying to enable auto increment for PK column by checking "Identity" but I am getting error while executing the script in MySQL.

Error Code: 1075
Incorrect table definition; there can be only one auto column and it must be defined as a key

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Apr 30 at 03:45 PM

    Is it the only column in the PK?

    Is it the only column where Identity = True?

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 04 at 03:28 PM

    Hello,
    It depends on how many AUTO_INCREMENT columns you have in the table definition.
    If there is only one, verify it is a primary key int column.
    If there are many ones, you will have to remove the AUTO_INCREMENT attribute from one of your columns.
    May you share the CREATE TABLE statement?
    Thank you,
    Arnaud

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 07 at 10:25 AM

    There is a standard model check in MySQL support to spot these problems before you create or update the database - it's called "Number of auto-incremented columns", and it's a warning by default. I suggest you change the severity to 'error' , so you're forced to deal with it :)

    Add comment
    10|10000 characters needed characters exceeded