SolveErrors
MYSQL

Need help understanding error message

11 views

I'm not terribly experienced with databases. Can someone tell me what's wrong with this query? I've included the error message below - I'm not sure what it's telling me or how I fix it.

CREATE TABLE saClient(
clientID INTEGER UNSIGNED NOT NULL ,
firstName VARCHAR NOT NULL AUTO_INCREMENT ,
middleName VARCHAR NULL ,
lastName VARCHAR NULL ,
address1 VARCHAR NULL ,
address2 VARCHAR NULL ,
city VARCHAR NULL ,
state VARCHAR NULL ,
zip VARCHAR NULL ,
birthday VARCHAR NULL ,
ssn VARCHAR NULL ,
fax VARCHAR NULL ,
email1 VARCHAR NULL ,
email2 VARCHAR NULL ,
phoneCell VARCHAR NULL ,
phoneHome VARCHAR NULL ,
phoneWork VARCHAR NULL ,
phoneOther VARCHAR NULL ,
emergContactName VARCHAR NULL ,
emergContactPhone1 VARCHAR NULL ,
emergContactPhone2 VARCHAR NULL ,
emergContactRelationship VARCHAR NULL ,
sex TINYINT UNSIGNED NULL ,
notes TEXT NULL ,
STATUS TINYINT UNSIGNED NULL ,
PRIMARY KEY ( clientID )
)

MySQL said: Documentation
#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 'NOT NULL AUTO_INCREMENT,
middleName VARCHAR NULL,
lastName VARCHAR NULL,
' at line 3

More MYSQL fixes

Mysql DumpingMySQL resourcesItalian Characters are stored as "?" in the database.How to pull a list....Select finding no dataconvert the query mssql database to mysql database