Solved

Foreign key with multiple columns.

Posted on 2001-09-10
1
1,298 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
File generation using utl_file 4 55
Difference in number of minutes between 2 timestamps 16 53
dates - loop 12 67
Oracle collections 15 23
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

810 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