Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Constraint question - maybe simple?

Constraint question - maybe simple?

From: dean <deanbrown3d_at_yahoo.com>
Date: 24 Oct 2005 08:59:11 -0700
Message-ID: <1130169551.662815.184380@g14g2000cwa.googlegroups.com>


I have a table TRAIN with several fields, and the three ones of importance are:

  1. TRAIN_I number not null
  2. P_VERSION_I number not null
  3. TRN_SYMBOL_I varchar2(6) not null

The primary key is on TRAIN_I and P_VERSION_I.

Is it possible to add a constraint such that there can be several pairs of (TRAIN_I, TRN_SYMBOL_I) but they must match? What I mean is, if there is one record with TRAIN_I = 123, and TRN_SYMBOL_I = ABC, and we add another record with TRAIN_I = 123 (and a different P_VERSION_I of course), then it is constrained to have TRN_SYMBOL_I = ABC?

I can't think of a simple way, although I am a beginner here.

Thanks,

Dean Received on Mon Oct 24 2005 - 10:59:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US