SQL query syntax error (take 2)

HI,

I have another syntax error in a query when importing sql file to MySQL:

Error in query (1064): Syntax error near ') NOT NULL , LastName VARCHAR(50) NOT NULL , Salutation VARCHAR() , Professio' at line 4

It's happening on table creation. Here is the query:

DROP TABLE Legislators;
CREATE TABLE Legislators(
  LegislatorID INTEGER(3) NOT NULL PRIMARY KEY 
, PersonalTitle VARCHAR(50) NOT NULL
, FirstName VARCHAR() NOT NULL
, LastName VARCHAR(50) NOT NULL
, Salutation VARCHAR()
, ProfessionalTitle VARCHAR(50) NOT NULL
, AddressType1 VARCHAR(4) NOT NULL
, Address1 VARCHAR(50)
, City1 VARCHAR(50) NOT NULL
, State1 VARCHAR(2) NOT NULL
, PostalCode1 INTEGER(10) NOT NULL
, AddressType2 VARCHAR(1)
, Address2 VARCHAR(50)
, City2 VARCHAR(50)
, State2 VARCHAR(2)
, PostalCode2 INTEGER(10)
, PhoneType1 VARCHAR(4) NOT NULL
, Phone1 VARCHAR(12) NOT NULL
, PhoneType2 VARCHAR(9)
, Phone2 VARCHAR(12)
, PhoneType3 VARCHAR(6)
, Phone3 VARCHAR(12)
, Email VARCHAR(50)
, Notes VARCHAR(1)
, SenateDistrict INTEGER(3)
, HouseDistrict INTEGER(3)
, PartyAffiliation VARCHAR(50) NOT NULL
, CreatedAccount VARCHAR(1)
, CreatedDate DATE 
, CreatedTime VARCHAR(8)
, ModifiedAccount VARCHAR(10) NOT NULL
, ModifiedDate DATE  NOT NULL
, ModifiedTime VARCHAR(8) NOT NULL
);

Open in new window


Any idea what's wrong here?

Thanks Bill
LVL 1
billium99Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kanti PrasadCommented:
Hi

Change as below

FirstName VARCHAR(50) NOT NULL

, Salutation VARCHAR(50)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
billium99Author Commented:
What the...not sure how that happened. That did it!
0
billium99Author Commented:
Thanks for the help!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Query Syntax

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.