List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:November 6 2002 4:47am
Subject:Re: Help with creation...CREATE
View as plain text  
At 20:36 -0800 11/5/02, Phil Straw wrote:
>OK guys, I am a relative newbie with MySql, but know something at least of
>databases. Please can you direct me as to where this CREATE statement is
>wrong. I am lost.
>
>I get ERRORCODE 1064 which looks to be near DB_ERROR_SYNTAX in the code.
>Before wading through all that I though I might ask the experts....
>
>create table test.Links (
>   url TEXT NOT NULL,
>   safe SMALLINT NOT NULL,
>   broken TINYINT,
>   summary VARCHAR NOT NULL,

VARCHAR isn't legal without a length, e.g., VARCHAR(20).

>   details TEXT,
>   averating SMALLINT,
>   addedbyuser VARCHAR NOT NULL,
>   urlhash CHAR NOT NULL PRIMARY KEY
>)
>
>Followed by
>     SQLSTATE   42000
>     ERRORCODE  1064
>
>     MESSAGE:
>     Syntax error or access violation: You have an error in your SQL syntax
>near 'NOT NULL,
>     details TEXT,
>     averating SMALLINT,
>     addedbyuser VARCHAR NOT NULL,
>     ' at line 5
>
>
>Any help welcome !
>P/.

Thread
Help with creation...CREATEPhil Straw6 Nov
  • Re: Help with creation...CREATEPaul DuBois6 Nov
  • Re: Help with creation...CREATERobert Citek6 Nov