Error: 1075
Maken89
Posts: 1 New member
I've google a bit about this can't seem to find a straight answer. Has anyone got the MySQL Error: 1075?
What does this errorcode mean?
What does this errorcode mean?
Answers
id
column. (MySQL requires that there be a unique index. The other possibility, which you would have already figured out, is that there can be only one column defined as AUTO_INCREMENT within the table.)See more: https://www.repairtoolbox.com/mysqlrepair.html
MySQL is returning that error (most likely) because there is no unique index defined on the
id
column. (MySQL requires that there be a unique index. The other possibility, which you would have already figured out, is that there can be only one column defined as AUTO_INCREMENT within the table.)To get that column to be an AUTO_INCREMENT, you can add either a UNIQUE constraint or a PRIMARY KEY constraint on the
id
column. For example:(Note that this statement will return an error if any duplicate values exist for the id column.)
Alternatively, you can make the id column the PRIMARY KEY of the table (if the table doesn't already have a PRIMARY KEY constraint defined).
(Note that this statement will return an error if any duplicate value exist for the id column, OR if there are any NULL values stored in that column, of if there is already a PRIMARY KEY constraint defined on the table.)
If it still doesn't work,try this: https://docsbay.net/mysql-php-newbie
Or try this: CREATE TABLE `testing` (