Skip to Content
0

how-to-create-a-foreign-key-relation-with-a-non-key-field??

Sep 27, 2017 at 07:52 AM

30

avatar image
Former Member

How-to-create-a-foreign-key-relation-with-a-non-key-field.?

I have a field emp_name in a table called X where it is a non-key field.

I want to make it a foreign-filed in another table called Y.

Is it possible?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Ankit Maskara
Oct 11, 2017 at 04:00 AM
0

As far as I know, it's not possible because foreign key relationship is used to maintain referential integrity constraints of the database and this constraints restricts the values in dependent table from the key vaules in the parent table.

In short, not possible. What's the requirement?

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Oct 19, 2017 at 09:07 AM
0

Hi Ankit,

I wanted to assign a non-key field of one table to as a suggestion field in another table.

Thanks for the reply I checked with other seniors too they suggested me it is not a recommended and feasible design.

Thanks again.

Share
10 |10000 characters needed characters left characters exceeded