cancel
Showing results for 
Search instead for 
Did you mean: 

Auto increment for Primary Key in Powerdesigner

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

GeorgeMcGeachie
Active Contributor
0 Kudos

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 🙂

arnaud_laurent
Employee
Employee
0 Kudos

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

GeorgeMcGeachie
Active Contributor
0 Kudos

Is it the only column in the PK?

Is it the only column where Identity = True?