on 04-30-2018 3:09 PM
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
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 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is it the only column in the PK?
Is it the only column where Identity = True?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.