MySQl错误#1064 [英] MySQl Error #1064
本文介绍了MySQl错误#1064的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不断收到此错误:
MySQL说:#1064-您遇到错误 在您的SQL语法中;查看手册 对应于您的MySQL服务器 使用正确语法的版本 在'INSERT INTO附近 books.book(isbn10,isbn13,title,edition,author_f_name,author_m_na' 在第15行
MySQL said: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO books.book(isbn10,isbn13,title,edition,author_f_name,author_m_na' at line 15
使用此查询:
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');
有什么问题吗?
推荐答案
也许您忘记在此代码行之后添加";
":
maybe you forgot to add ";
" after this line of code:
`quantity` INT NOT NULL)
这篇关于MySQl错误#1064的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文