Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Using constant as part of reference key
Hi all,
Let's say I have a master table named "MASTER" with the following
fields:
Command_Type number(1),
Timestamp date,
a number(3),
b number(3)
and to tables "DETAIL1" & "DETAIL2" with the following fields:
Timestamp date,
a number,
c number,
d number
......
The primary key for "MASTER" consist of (command_type,timestamp,a) and
I want to create for bot detail tables a reference key which refers to
"MASTER" but each table represents a different constant value for the
command_type field (what I mean is that for example all records in
DETAIL1 match command_type 1, and all records in DETAIL2 match
command_type 2. Please notice that commad_type field is not part of
detail tables).
What is the syntax for this reference key?
Thanks in advance Received on Thu Mar 17 2005 - 06:53:16 CST