Do you have a question? Post it now! No Registration Necessary. Now with pictures!
November 28, 2005, 8:38 pm
rate this thread
`building` VARCHAR NOT NULL DEFAULT '',
`location` VARCHAR(45) NOT NULL DEFAULT '',
ENGINE = InnoDB;
MySQL Error Number 1064
You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the rights syntax to use
near 'NOT NULL DEFAULT".
'location' VARCHAR(45) NOT NULL DEFAULT".
PRIMARY K' at line 2
Can you please explain the reason for this error and inability to create a
table as a result.
Re: MySQL Error Number 1064
You must specify a length for the `building` field.
The SQL standard permits CHAR datatypes to be specified with no length,
and in this case, the length is implicitly 1. MySQL supports this
syntax for the CHAR datatype.
However, this behavior does not apply to VARCHAR as it does to CHAR.
You must specify a length when declaring fields of datatype VARCHAR.
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum