At 8:57 AM +0000 5/27/1999, Sandrine C. wrote:
>YHello, me again !
>
>I send a message this mornig telling i had problem inserting the 11th item
>in a table.
>the answer was because my autoincrement field was a varchar. so i changed it
>with a BIGINT.. but now I have error, and dont see what s awrong with my
>syntax. i have the myql manual in front of me, and really, i dont see
>anythg wrong... SO IF YOU HAVE BETTER EYES TAHN I !!
>
>here is the table i want to creat and the error message
>mysql> CREATE TABLE organisme (
> -> OR_Code BIGINT(8) ZEROFILL PRIMARY KEY
>AUTO_INCREMENT NOT NULL,
> -> OR_Raison VARCHAR(40) UNIQUE NOT NULL,
> -> OR_Libelle VARCHAR(50),
> -> AD_Adresse BIGINT(8) ZEROFILL,
> -> OR_Statut ENUM('', 'Prive', 'Public'),
> -> OR_Implementation ENUM('', 'Nationale', 'Regionale',
>'Locale'),
> -> CO_Directeur BIGINT(8) ZEROFILL,
> -> CO_InterlPrinc BIGINT(8) ZEROFILL,
> -> OR_Etat ENUM ('Actif', 'Inactif', 'En
>Attente') NOT NULL,
> -> OR_DateMAJ DATE NOT NULL,
> -> INDEX OR_index (OR_Code, OR_Etat, OR_Raison,
>OR_DateMAJ) );
>ERROR 1064: You have an error in your SQL syntax near 'UNIQUE NOT NULL,
> OR_Libelle VARCHAR(50),
> AD_Adresse' at line 3
UNIQUE should follow NOT NULL, not precede it.
--
Paul DuBois, paul@stripped
Northern League Chronicles: http://www.snake.net/nl/