I am creating a table and have numerous foreign keys. However, the very last foreign key in the code gives me an error code. If I remove this line the code works. Can anyone explain what is wrong?
This is the last two lines of the code:
FOREIGN KEY (start_address_id) REFERENCES Addresses(address_id),
FOREIGN KEY (end_address_id) REFERENCES Addresses(address_id)
);
if I remove the Foreign key in the last line, for end_address_id, the code works. I am a total novice at MYSQL so hopefully it is a simple solution I can understand!
New contributor
GWH is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.