Thanks, Barry!
I entered the date without the dashes and was able to create the table just
fine. Do you have any idea why this makes a difference? Can't believe
everything you read in a book, I guess!
And yes, I did end the statement with the semicolon when I submitted it;)
Onward...
Jeff
> From: "Barry C. Hawkins" <[EMAIL PROTECTED]>
> Date: Wed, 13 Jun 2001 12:28:30 -0400
> To: Jeff Caron <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> Subject: Re: Newbie stumped by table error
>
> on 6/13/01 10:58, Jeff Caron at [EMAIL PROTECTED] wrote:
>
>> Hello-
>>
>> I'm just beginning to teach myself MySQL with the help of Michael Widenius'
>> book "MySQL". I've entered the create table statement exactly as shown in
>> the book (pg. 28 if you have the book) and I get an error message every
>> time. This is very frustrating as I can't go any further with the tutorial
>> without creating all the tables first. Could someone on this list please
>> help me so I can correctly create this table?
>>
>> Incidentally, I checked the corrections document on the book publisher's web
>> site and there were no corrections for this page. This makes me even more
>> stumped...
>>
>> Here's the statement I submitted:
>>
>> CREATE TABLE member
>> (
>> last_name VARCHAR(20) NOT NULL,
>> first_name VARCHAR(20) NOT NULL,
>> suffix VARCHAR(5) NULL,
>> expiration DATE NULL DEFAULT "0000-00-00",
>> email VARCHAR(100) NULL,
>> street VARCHAR(50) NULL,
>> city VARCHAR(50) NULL,
>> state VARCHAR(2) NULL,
>> zip VARCHAR(10) NULL,
>> phone VARCHAR(20) NULL,
>> interests VARCHAR(255) NULL
>> )
>>
>> Here's the error message I keep getting:
>>
>> ERROR 1064 at line 1: You have an error in your SQL syntax near '-00-00,
>> email VARCHAR(100) NULL,
>> street VARCHAR(50) NULL,
>> city VARCHAR(50) NULL,' at line 6
>>
>>
>> Any help would be most appreciated.
>>
>> Jeff Caron
>>
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> Before posting, please check:
>> http://www.mysql.com/manual.php (the manual)
>> http://lists.mysql.com/ (the list archive)
>>
>> To request this thread, e-mail <[EMAIL PROTECTED]>
>> To unsubscribe, e-mail
>> <[EMAIL PROTECTED]>
>> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>>
> Did you try leaving out the dashes? Also, I am sure you are putting a
> semicolon after the closing bracket of the CREATE TABLE statement, right?
>
> Hope this helps,
> --
> Barry C. Hawkins
> Systems Consultant, MCSE 4.0
> [EMAIL PROTECTED]
>
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php