Anna Drybulska
Anna Drybulska

Reputation: 231

How to debug MySQL syntax error #1064?

I would really appreciate some help. Got this error importing the database:

1064 - 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 ')'

Here is the code which gives error:

CREATE TABLE `c9soa_assets` (
  `id` int(10) UNSIGNED NOT NULL COMMENT 'Primary Key',
  `parent_id` int(11) NOT NULL DEFAULT '0'COMMENT
) ;

Upvotes: 1

Views: 354

Answers (2)

Rohan Kumar
Rohan Kumar

Reputation: 40639

You need to add comment like,

CREATE TABLE `c9soa_assets` (
  `id` int(10) UNSIGNED NOT NULL COMMENT 'Primary Key',
  `parent_id` int(11) NOT NULL DEFAULT '0' COMMENT 'Parent Id'
) ;

Upvotes: 1

Jason C
Jason C

Reputation: 40315

You need to specify a comment after that last COMMENT, or remove it.

Upvotes: 2

Related Questions