0

在 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

如果我可以提供更多信息,请告诉我。

4

1 回答 1

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)
    );
于 2013-11-07T01:27:58.790 回答