From: eifion herbert (IAH-C) [mailto:[EMAIL PROTECTED]
> Hi,
>
> Probably a very basic question.
>
> I'm trying to a create a table in mySQL 4.0.15 thus:
>
> create table VACANCIES(
> VACREF char(6) NOT NULL PRIMARY KEY,
> TITLE varchar(60),
> LOC varchar(9),
> DESC text,
> STARTDATE date,
> GROUP varchar(25),
> CONSTRAINT fk_grp FOREIGN KEY (GROUP) REFERENCES GROUPS(GPNAME),
> CONSTRAINT chk_loc CHECK (LOC in ('Loc1', 'Loc2', 'Loc3'));
>
> And it says I have a syntax error. I've been through the manual and
> can't spot what I've done wrong. Anyone?
I'm willing to bet that it's because DESC is a reserved word (an abbreviation of
DESCRIBE, used to show a table structure).
Either change the name of that column or wrap it in backticks (`DESC`) whenever it's
referenced.
HTH!
--
Mike Johnson
Web Developer
Smarter Living, Inc.
phone (617) 886-5539
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]