Unable to add AUTO INCREMENT to more than one column in the same table
The query below will generate an error because we can not have several columns with
AUTO_INCREMENT
feature
CREATE TABLE note (
    id int AUTO_INCREMENT,
    note_id int AUTO_INCREMENT,
    title varchar(50),
    description varchar(50),
    PRIMARY KEY(id, note_id)
);
The query generates the following error:
#1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key
by Valeri Tandilashvili
4 years ago
MySQL
CREATE TABLE
AUTO_INCREMENT
1
Pro tip: use ```triple backticks around text``` to write in code fences