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 -> Re: Help on Data Integrity Constraints

Re: Help on Data Integrity Constraints

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 04 May 2005 00:17:30 +0200
Message-ID: <c0uf71h8jo6ai1c9553c51s6j9b2blrcpc@4ax.com>


On 3 May 2005 14:52:26 -0700, "vsatya_at_gmail.com" <vsatya_at_gmail.com> wrote:

>Adding more columns, won't it affect the performance.
>
>Can foreign key constraint be created something like below instead of
>adding new columns?
>

Look up the definition of foreign key. Now answer your own question.

>Constraint constraint1 FOREIGN KEY ('AISTATUS',Status) REFERENCES
>Master(Type,Code),
>Constraint constraint1 FOREIGN KEY ('ROLE',Designation) REFERENCES
>Master(Type,Code),
>Constraint constraint1 FOREIGN KEY ('SEX',Gender) REFERENCES
>Master(Type,Code)
>
>I am getting ORA-00904- invalid identifier error.
>
>Can a foreign key constraint be created with a fixed value and a table
>column referencing another table primary key that has two fields?

Is this a rhetorical or a real question. a foreign key consists of one or more *columns*. Is a constant a column?

--
Sybrand Bakker, Senior Oracle DBA
Received on Tue May 03 2005 - 17:17:30 CDT

Original text of this message

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