我想在数据库中创建一个新表。
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 服务器版本对应的手册,了解在 'creat table 'lps_inventory' 附近使用的正确语法(eartag int(11( 不为空, 散装锡(4(, HPT int(1' 在第 1 行
我该如何解决这个问题?
quote should be `, not ', or do it without quote.
试试这个:
create table lps_inventory (eartag int(11) not null,
bulk tinyint(4),
hpt int(11),
idbox varchar(30),
location char(10),
comnt varchar(40));