我正在学习Mysql,并且尝试使用shell创建表,这是我用来创建表的代码:
CREATE TABLE IF NOT EXISTS books(¬
book_id INTEGER UNSIGNED PRIMARY KEY AUTO_INCREMENT,¬
author_id INTEGER UNSIGNED,¬
title VARCHAR(100) NOT NULL,¬
year INTEGER UNSIGNED NOT NULL DEFAULT 1900,¬
language VARCHAR(2) NOT NULL DEFAULT 'es',¬
cover_url VARCHAR(500),¬
price DOUBLE(6,2) NOT NULL DEFAULT 10.0,¬
sellable TINYINT(1) DEFAULT,¬
description TEXT¬
);¬
这给了我这个错误:
ERROR 1064 (42000): 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 '¬
book_id INTEGER UNSIGNED PRIMARY KEY AUTO_INCREMENT,¬
author_id INTEGER UN' at line 1
答案 0 :(得分:3)
看看倒数第二行,您忘记给Front Rear Left Right Up Down percent status
Done Done Done Done Done Done 100 Complete
Done Done Done Done No Need No Need 100 Complete
Done Ongoing Ongoing Done Done Not Yet 50 Ongoing
Not Yet Not Yet Not Yet Not Yet Not Yet Not Yet 0 Not Yet
设置默认值。
sellable