Create table and add several INDEXES
Creates the table
note
and adds several indexes
(ind_note_id, ind_title_description)
at the same time
CREATE TABLE note (
    id int AUTO_INCREMENT,
    note_id int,
    title varchar(50),
    description varchar(50),
    PRIMARY KEY(id, note_id),
    INDEX ind_note_id (note_id),
    INDEX ind_title_description (title, description)
);
by Valeri Tandilashvili
4 years ago
MySQL
Index
CREATE TABLE
1
Pro tip: use ```triple backticks around text``` to write in code fences