0
Terminé

MySQL: Display an error if there are multiple AUTO_INCREMENT fields defined in a table.

Jadaw1n il y a 10 ans mis à jour par Agnieszka Kozubek-Krycuń (Chief Scientist) il y a 10 ans 2
If there are multiple fields defined with AUTO_INCREMENT set, MySQL (and maybe other databases) throw an error:
CREATE TABLE test (
id int NOT NULL AUTO_INCREMENT,
otherthing int NOT NULL AUTO_INCREMENT
)
#1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key
JE SUIS SATISFAIT
Note de satisfaction par Jadaw1n il y a 10 ans