I have 2 tables: commerciaux and production. I want to create a Foreign key in production linked to the table commerciaux.
ALTER TABLE PRODUCTION
ADD CONSTRAINT FK_PRODUCTION_1
FOREIGN KEY (NOM_COMMERCIAL)
REFERENCES COMMERCIAUX(NOM_COMMERCIAL)
ON DELETE CASCADE
ON UPDATE CASCADE
When I commit I got the error:
This operation is not defined for system tables.
unsuccessful metadata update.
could not find UNIQUE or PRIMARY KEY constraint in table COMMERCIAUX with specified columns.
How can I fix this issue?