stockton Posted September 19, 2008 Share Posted September 19, 2008 I am attempting to create a table in an existing database using:- CREATE TABLE 'Users' ( 'UserNum' int(4) NOT NULL auto_increment, 'FirstName' varchar(20) NOT NULL default '', 'LastName' varchar(20), 'Usrname' varchar(10), 'Passwrd' varchar(15), 'AccessLevel' int NOT NULL default 0, 'last_login' datetime NOT NULL default '0000-00-00 00:00:00', 'UserID' int NOT NULL default 0, PRIMARY KEY ('UserNum') ) TYPE MyISAM AUTO_INCREMENT=1; and it fails with:- ERROR 1064 (42000): 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 ''Users' ('UserNum' int(4) NOT NULL auto_increment, 'FirstName' varchar(20) NOT N' at line 1 Please help. Quote Link to comment Share on other sites More sharing options...
Aimee Posted September 19, 2008 Share Posted September 19, 2008 I'm not sure how fussy it is but you're using the wrong type of quotes - try using ` instead of '. It worked for me when I ran your query with those quotes replaced. Quote Link to comment Share on other sites More sharing options...
stockton Posted September 19, 2008 Author Share Posted September 19, 2008 Thank you. That fixed it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.