Skip to content
Advertisement

I keep getting 1064 error in phpmyadmin

I am trying to create a table in phpmyadmin with the following

But keep getting this error :

1064 – You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘) NOT NULL , date VARCHAR(255) NOT NULL , PRIMARY KEY (Id(5))) ENGINE =’ at line 1

I don’t really understand what the error mean ? any Idea ?

Advertisement

Answer

The key(id(5)) is suspect. But you have another error as well: double doesn’t take a length argument.

The following should work:

Here is a SQL Fiddle.

Note: I don’t think it is helpful to put length arguments after numeric types (other than decimal/numeric). You might want to consider removing all of them.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement