SQL syntax error in phpMyAdmin while create table ?
If you are getting errors when you try to create a table like:
CREATE TABLE `foo` (
`bar` VARCHAR NOT NULL
)
And get a MySQL error:
MySQL said:
You have an error in your SQL syntax near ‘NOT NULL)’ at line 1
Then this probably means that you have forgotten to specify a length for the Varchar type
in the “Length/Values” column,which is a required field.
So, this is wrong:
CREATE TABLE bla (bla VARCHAR NOT NULL);
And this is correct:
CREATE TABLE bla (bla VARCHAR (25) NOT NULL);



















