Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Foreign Key Constraint Based On View.

user12068331May 6 2010 — edited May 6 2010
I have table which stores each department and a date column. This table has foreign key constraint on our department table to make sure that inserted department should be in dictionary table. Now, I would like to store another row for all departments. I can't do that because of constraint.

Can I create a view which will be union of all departments and another row for 'AAA' (all departments) and put foreign key constraint based on that view?
Or is there any easier way to achieve this other than disable the constraint or add row for all departments in a dictionary table.

Thanks your help and I will appreciate any help in this regard.

Vikas
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 3 2010
Added on May 6 2010
2 comments
1,112 views