List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:June 13 2001 11:07pm
Subject:Re: Newbie stumped by table error
View as plain text  
You'll see exactly that error if you type the default date "0000-00-00"
*without* the quotes.  If you included the quotes, then something is
quite odd indeed.  This is such a basic statement in the book that
you can be sure any error would have been reported by now.

What version of MySQL are you using, and on what platform?

>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,
>last_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

-- 
Paul DuBois, paul@stripped
Thread
Newbie stumped by table errorJeff Caron13 Jun
  • Re: Newbie stumped by table errorBarry C. Hawkins13 Jun
    • Re: Newbie stumped by table errorJeff Caron13 Jun
      • RE: Newbie stumped by table errorBarry C. Hawkins13 Jun
  • Re: Newbie stumped by table errorTim13 Jun
    • Re: Newbie stumped by table errorJeff Caron13 Jun
  • Re: Newbie stumped by table errorTim13 Jun
    • Re: Newbie stumped by table errorJeff Caron13 Jun
  • Re: Newbie stumped by table errorPaul DuBois14 Jun
RE: Newbie stumped by table errormassey13 Jun