Skip to Content
0

Auto increment for Primary Key in Powerdesigner

Apr 30 at 02:09 PM

183

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

George McGeachie Apr 30 at 03:45 PM
0

Is it the only column in the PK?

Is it the only column where Identity = True?

Share
10 |10000 characters needed characters left characters exceeded
Arnaud LAURENT
Jun 04 at 03:28 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
George McGeachie Jun 07 at 10:25 AM
0

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 :)

Share
10 |10000 characters needed characters left characters exceeded