im trying to have table that will represent a connection table
the attributes are foreign key.
it gives an error.
for example:
CREATE TABLE Person(
ID INT PRIMARY KEY,
Name VARCHAR(100));
CREATE TABLE Accessory(
ID INT PRIMARY KEY,
Name VARCHAR(100));
CREATE TABLE PersonAccessory(
PersonID INT NOT NULL ,
AccessoryID INT NOT NULL,
FOREIGN KEY PersonID REFERENCES Person(ID),
FOREIGN KEY AccessoryID REFERENCES Accessory(ID));
Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FOREIGN KEY REFERENCES Person(ID), AccessoryID FOREIGN KEY REFERENCES Accessory(' at line 4
thanks.