Re: Cannot add foreign key constraint (1215)
Posted by:
Bob Paris
Date: July 18, 2013 02:26PM
Using MySQL Workbench 5.2.47 CE
Created schema dossier with the command: CREATE SCHEMA `dossier` ; then I tried
CREATE TABLE Orders
(
O_Id int NOT NULL,
OrderNo int NOT NULL,
P_Id int,
PRIMARY KEY (O_Id),
FOREIGN KEY (P_Id) REFERENCES Persons(P_Id)
)
and I got : Cannot add foreign key constraint (1215) Why?
Subject
Views
Written By
Posted
44384
July 11, 2013 02:51PM
13568
July 11, 2013 03:15PM
Re: Cannot add foreign key constraint (1215)
8690
July 18, 2013 02:26PM
5942
July 25, 2013 08:45AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.