Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple query error 1

Status
Not open for further replies.

andyb2005

IS-IT--Management
Feb 9, 2005
58
0
0
GB
Hi

I am just trying to execute this query on a new mysql db with the query window in phpMyAdmin but am getting an error but can't figure out why - anyone got any ideas?

Code:
Error

SQL-query :  

CREATE TABLE cust(

cust_id INT NOT NULL AUTO_INCREMENT ,
cust_title VARCHAR NULL ,
cust_firstname VARCHAR( 20 ) NOT NULL ,
cust_surname VARCHAR( 20 ) NOT NULL ,
cust_companyname VARCHAR( 20 ) NOT NULL ,
cust_address_1 VARCHAR NOT NULL ,
cust_address_2 VARCHAR NULL ,
cust_address_3 VARCHAR NULL ,
cust_town VARCHAR NOT NULL ,
cust_county VARCHAR NULL ,
cust_country VARCHAR NOT NULL ,
cust_postcode VARCHAR NOT NULL ,
PRIMARY KEY ( cust_id ) 
) 

MySQL said: 

You have an error in your SQL syntax near 'NULL ,
cust_firstname VARCHAR( 20  )  NOT  NULL ,
cust_surname VARCHAR( 20  )  N' at line 2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top