Re: Possible constraint creation
I thought that it should work like that but I must be using the incorrect creation statement. This is what I used:
Table1 is the sub_dept table and table2 is the dept table.
ALTER TABLE `table1` ADD CONSTRAINT `fk_dept_id_sub_dept`
FOREIGN KEY (`dept_id`) REFERENCES `table2` (`dept_id`);
Thanks!
Subject
Views
Written By
Posted
1623
November 20, 2015 11:56AM
767
November 20, 2015 12:20PM
Re: Possible constraint creation
930
November 23, 2015 06:20AM
830
November 23, 2015 01:00PM
824
November 23, 2015 07:01AM
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.