table create error

0 ray warren · October 24, 2014
I am a newbie to MySQL. I have created a personnel database and have successfully added several tables. I am in the process of creating more tables, but I cannot get past this error: 

#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 'CREATE TABLE pers_paf_addr ( pers_addr_paf_no INT(9) NOT NULL, pers_ad' at line 3 

Here is the code I am using: 
CREATE TABLE pers_paf_addr ( 
pers_addr_paf_no INT(9) NOT NULL, 
pers_addr_old_street VARCHAR(25), 
pers_addr_old_city VARCHAR(20), 
pers_addr_old_st CHAR(2), 
pers_addr_old_zip CHAR(9), 
pers_addr_new_street VARCHAR(25), 
pers_addr_new_city VARCHAR(20), 
pers_addr_new_st CHAR(2), 
pers_addr_new_zip CHAR(9), 
pers_addr_date DATE 
KEY (pers_addr_paf_no) 

I have compared this to code that worked and cannot seem to determine why it is failing. 
R. Warren

Post a Reply


Oldest  Newest  Rating
0 Eugene Botma · October 24, 2014
You left out a comma after date. Try and add the comma and it should work.
  • 1

SQL & Databases


Everything SQL and Databases related in here!

Bucky Roberts Administrator