AUTO_INCREMENT in MYSQL generates a unique number when a new record is inserted into the table. If you want to automatically create the value of a primary key field every time a new record is inserted, you can create an auto-increment field in the table.
mysql table creation statement example for creating an auto-increment primary key table:
CREATE TABLE `tablename` ( `id` int(11) NOT NULL AUTO_INCREMENT , PRIMARY KEY (`id`) )ENGINE=MyISAM DEFAULT CHARSET=utf8;
Related recommendations: "Navicat for mysql graphic tutorial"
mysql If you want to set auto-increment (auto_increment) when creating a table, it must be the primary key (PRIMARY KEY) setting, it cannot be NULL, and only one can be set.
#1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key。
This error means: #1075 - The table definition is incorrect; there can only be one automatic column and it must be defined as the primary key.
If this error occurs, you need to check the table creation statement. If auto-increment is set, you need to set the auto-increment field as the primary key.
The above is the detailed content of What to do if error 1075 occurs in Navicat. For more information, please follow other related articles on the PHP Chinese website!