Re: issues with foreign key constraint ERROR 1005
Posted by:
Zach Ellis
Date: November 03, 2023 11:47AM
Hello Jon
This might be a dumb question that I have.
for the formatting of code does that go with all links? or should i use a [LINK] tag for links
ex
[LINK]
https://stackoverflow.com/questions/12994919/errno-121-duplicate-key-on-write-or-update
is this how it should be used.
ALTER TABLE `TCTSandpit`.`tbl_Emp_Expences`
ADD CONSTRAINT `Emp_ID`
FOREIGN KEY (`Emp_ID`)
REFERENCES `TCTSandpit`.`tbl_Emp_Details` (`Emp_ID`)
ON DELETE CASCADE
ON UPDATE CASCADE;
or should we have the code in the brackets
[CODE
ALTER TABLE `TCTSandpit`.`tbl_Emp_Expences`
ADD CONSTRAINT `Emp_ID`
FOREIGN KEY (`Emp_ID`)
REFERENCES `TCTSandpit`.`tbl_Emp_Details` (`Emp_ID`)
ON DELETE CASCADE
ON UPDATE CASCADE;
]
or should there be a tag at the start of the code and one at the end.
ALTER TABLE `TCTSandpit`.`tbl_Emp_Expences`
ADD CONSTRAINT `Emp_ID`
FOREIGN KEY (`Emp_ID`)
REFERENCES `TCTSandpit`.`tbl_Emp_Details` (`Emp_ID`)
ON DELETE CASCADE
ON UPDATE CASCADE;
Thank you for your time
Zach Ellis
Subject
Written By
Posted
November 01, 2023 08:15AM
November 03, 2023 09:43AM
November 03, 2023 10:17AM
November 03, 2023 11:37AM
November 03, 2023 10:21AM
Re: issues with foreign key constraint ERROR 1005
November 03, 2023 11:47AM
November 03, 2023 11:52AM
November 03, 2023 10:10PM
November 05, 2023 05:50AM
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.