Solved

Foreign key with multiple columns.

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

Join & Write a Comment

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
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 explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
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

757 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now