Daolin
Daolin

Reputation: 634

ERROR 1064 (42000) creating table in mysql

I would like to create a new table in the database.

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));

I got this error

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 'creat table 'lps_inventory' (eartag int(11) not null, bulk tinyint(4), hpt int(1' at line 1

How do I fix this?

Upvotes: 0

Views: 409

Answers (2)

user2260040
user2260040

Reputation: 1380

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

Upvotes: 2

rome 웃
rome 웃

Reputation: 1901

Try this:

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

Upvotes: 1

Related Questions