在MySQL中创建表会导致错误1064.我没有表名的限制词。
mysql> create database NamesInc
-> ;
Query OK, 1 row affected (0.10 sec)
mysql> create table NameInfo(
-> Name_ID NUMBER(8),
-> Language VARCHAR2(10),
-> Status VARCHAR2(10),
-> Standard VARCHAR2(10),
-> Place_ID Number(8) NOT NULL,
-> Supplier_ID NUMBER(8) NOT NULL,
-> Date Supplied DATE,
-> PRIMARY KEY (Name_ID),
-> );
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 'NUMBER(8),
Language VARCHAR2(8),
Status VARCHAR2(10),
PL' at line 2
如果我能提供更多信息,请告诉我。
答案 0 :(得分:1)
创建db语句后执行:
USE NamesInc;
create table NameInfo(
Name_ID INT(8),
Language VARCHAR(10),
Status VARCHAR(10),
Standard VARCHAR(10),
Place_ID INT(8) NOT NULL,
Supplier_ID INT(8) NOT NULL,
Date_Supplied DATE,
PRIMARY KEY (Name_ID)
);