Hi,
I am trying to complete an example from the book SQL for Microsoft Access. I have typed it into Access just as it appears in the book. When I run it, however, I get an error message telling me that there is a "Syntax error in Constraint clause." I have checked and checked and I am fairly certain that I typed it in right. Anyway, here is the code from the book.
CREATE TABLE Manufacturers
(
ManufacturerID INTEGER CONSTRAINT ManfID PRIMARY KEY,
ToyID INTEGER NOT NULL,
CompanyName CHAR (50) NOT NULL,
Address CHAR (50) NOT NULL,
City CHAR (20) NOT NULL,
State CHAR (2) NOT NULL,
AreaCode CHAR (3) NOT NULL,
PhoneNumber CHAR (8) NOT NULL UNIQUE,
CONSTRAINT ToyFk FOREIGN KEY (ToyID) REFERENCES Toys (ToyID)
ON UPDATE CASCADE
ON DELETE CASCADE
);
Does Access 2007 support constraints? If so, then could you please offer a guess as to what the problem could be? Oh, and yes, I did previously create the Toys table, so it can't be generating an error because of that being missing.
Ren