3 messages in com.mysql.lists.mysqlRe: Cant Explain Error Message
FromSent OnAttachments
Will K.01 Dec 2002 18:01 
Dan Nelson01 Dec 2002 18:08 
Will K.01 Dec 2002 18:25 
Subject:Re: Cant Explain Error Message
From:Dan Nelson (dnel@allantgroup.com)
Date:12/01/2002 06:08:26 PM
List:com.mysql.lists.mysql

In the last episode (Dec 02), Will K. said:

Hello.

I am trying to create a table in one of my databases using textbook code, but it is giving me an error message. Here is how it reads:

mysql> create TABLE messages -> ( -> id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, -> forum int not null, -> author char(255) not null, -> subject char(255) not null, -> email char(255) not null, -> date datetime not null, -> ip char(255) not null, -> message text not null, -> thread_id not null -> ) -> ; ERROR 1064: You have an error in your SQL syntax near 'not null )' at line 11

I have tried a few different ways of rewriting the id line, like this for instance:

id int not null primary key auto_increment,

That's not line 11 though. Line 11 is

-> thread_id not null

, which is missing a column type.