What is wrong with my SQL here? #1089 - Incorrect prefix key

后端 未结 13 1887
迷失自我
迷失自我 2020-12-01 02:21
CREATE TABLE `table`.`users` (
    `id` INT(11) NOT NULL AUTO_INCREMENT,
    `username` VARCHAR(50) NOT NULL,
    `password` VARCHAR(50) NOT NULL,
    `dir` VARCHAR(         


        
13条回答
  •  执笔经年
    2020-12-01 03:15

    Here the full solution step by step

    • First of all you have to make the table by inserting all the data. id should AI ticked.
    • then press go and #1089 error will be pop-up

    here is the solution

    • theres a button near go called preview SQL
    • click that button and copy the sql code
    • then click on SQL tab on top of the window
    • Clear the text filed and paste that copied code there.
    • you will be see (id (11)) this on bottom of the code
    • replace (id (11)) into (id)
    • and click go

    boom now you will be fine

提交回复
热议问题