尝试运行此mysql:
DROP TABLE IF EXISTS Student;
CREATE TABLE IF NOT EXISTS Student
(
StudentID int(4) NOT NULL PRIMARY KEY,
Read decimal(2,1) NOT NULL
);
但我一直收到错误:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Read decimal(2,1) NOTNULL)' at line 4
非常感谢任何帮助。
答案 0 :(得分:0)
READ
是一个有问题的关键字,因此请更改或转义
试试这个
CREATE TABLE IF NOT EXISTS Student
(
StudentID int(4) NOT NULL PRIMARY KEY,
`Read` decimal(2,1) NOT NULL
);