一尘不染

MySQl错误#1064

mysql

我不断收到此错误:

MySQL说:#1064-您的SQL语法有误;检查与您的MySQL服务器版本相对应的手册以获取正确的语法,以在第15行“ INSERT INTO
books.book(isbn10,isbn13,title,edition,author_f_name,author_m_na’‘

与此查询:

USE books;

DROP TABLE IF EXISTS book;


    CREATE TABLE `books`.`book`(
    `book_id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
    `isbn10` VARCHAR(15) NOT NULL,
    `isbn13` VARCHAR(15) NOT NULL,
    `title` VARCHAR(50) NOT NULL,
    `edition` VARCHAR(50) NOT NULL,
    `author_f_name` VARCHAR(50) NOT NULL,
    `author_m_name` VARCHAR(50) NOT NULL,
    `author_l_name` VARCHAR(50) NOT NULL,
    `cond` ENUM('as new','very good','good','fair','poor') NOT NULL,
    `price` DECIMAL(8,2) NOT NULL,
    `genre` VARCHAR(50) NOT NULL,
    `quantity` INT NOT NULL)

    INSERT INTO books.book(isbn10,isbn13,title,edition,author_f_name,author_m_name,author_l_name,cond,price,genre,quantity)** 
    VALUES ('0136061699','978-0136061694','Software Engineering: Theory and Practice','4','Shari','Lawrence','Pfleeger','very good','50','Computing','2');

知道是什么问题吗?


阅读 261

收藏
2020-05-17

共1个答案

一尘不染

也许您忘记;在此代码行之后添加“ ”:

`quantity` INT NOT NULL)
2020-05-17