Home : General : Databases and SQL :

General: Databases and SQL: SQL Syntax: Edit Log

Here is the list of edits for this post
SQL Syntax
Hi All, ive done a structure dump from another database, but when i try and create the following in another database i get an error



You have an error in your SQL syntax near '\'0\' NOT NULL auto_increment,
first_name varchar(50),
surname varchar(5' at line 2


Could some one tell me why??

Code:
CREATE TABLE users (
id int(11) DEFAULT '0' NOT NULL auto_increment,
first_name varchar(50),
surname varchar(50),
address1 varchar(100),
address2 varchar(100),
town varchar(100),
county varchar(100),
p_code varchar(100),
country varchar(100),
h_tel varchar(100),
m_prefix varchar(100),
m_tel varchar(100),
email varchar(100),
username varchar(100),
password varchar(100),
signup_date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
last_login datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
activated tinyint(4) DEFAULT '0' NOT NULL,
userlevel tinyint(4) DEFAULT '0' NOT NULL,
randc int(11),
PRIMARY KEY (id)
);
Regards

Mark
http://www.host4.me.uk

No doubt i'll be back for more answers!

Last edited by:

mdj1: Aug 13, 2003, 11:02 PM

Edit Log: