Thursday, 8 August 2013

What is wrong with the following MySQL create statement?

What is wrong with the following MySQL create statement?

I am struggling to get this simple table created in MySQL:
create table events (
id int,
when timestamp not null,
summary varchar(256) not null,
description varchar(500) not null,
owner int not null,
attendee int not null,
PRIMARY KEY(id),
FOREIGN KEY(owner) REFERENCES calendar_users(id),
FOREIGN KEY(attendee) REFERENCES calendar_users(id)
);
The description of the FKs are fine and the PK statement. However, MySQL
seems to have a problem in the third line for some reason. Could anyone
please help me out. Thanks.

No comments:

Post a Comment