ERROR 1064(42000)在mysql中创建表

时间:2016-02-16 03:03:42

标签: mysql

我想在数据库中创建一个新表。

mysql> create table 'lps_inventory' (eartag int(11) not null,
    -> bulk tinyint(4),
    -> hpt int(11),
    -> idbox varchar(30),
    -> location char(10),
    -> comnt varchar(40));

我收到了这个错误

  

错误1064(42000):您的SQL语法有错误;检查与您的MySQL服务器版本相对应的手册,以便在“创建表”附近使用正确的语法' lps_inventory' (eartag int(11)not null,       bulk tinyint(4),       hpt int(1'第1行

我该如何解决这个问题?

2 个答案:

答案 0 :(得分:2)

quote should be `, not ', or do it without quote.

答案 1 :(得分:1)

试试这个:

create table lps_inventory (eartag int(11) not null,
    bulk tinyint(4),
     hpt int(11),
     idbox varchar(30),
     location char(10),
     comnt varchar(40));
相关问题