Solved

Foreign key with multiple columns.

Posted on 2001-09-10
1
1,299 Views
Last Modified: 2008-02-26
I have two table say emp & dept.

In the emp table I have set 3 columns as primary key (composite key)

In the dept table again I have all the 3 columns in the emp table for which I want to establish a foreign key relation ship with the corresponding key in the emp table.

Is this possible?
0
Comment
Question by:Bijumathews
1 Comment
 
LVL 1

Accepted Solution

by:
TarekEslim earned 50 total points
ID: 6473337
yes,

use create index
or
 use alter table add constarint.

Tarek
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question