Re: RE : Integrity constraints

Re: RE : Integrity constraints

 

  

m wrote:
> One Difference That I can think of is that On a table having primary key
> You can pass the reference to another table through Referential integrity
> contraint.
> But can't be the same with unique key. Means A Table having primary key
> can only be referenced to another table with foreign key.

Unless I'm misunderstanding you this is not so. A referential integrity
constraint (foreign key) may be applied on either the primary key or a
unique index.

From the 10g concepts manual:

FOREIGN KEY: Requires each value in a column or set of columns to match
a value in a related table's UNIQUE or PRIMARY KEY. FOREIGN KEY
integrity constraints also define referential integrity actions that
dictate what Oracle should do with dependent data if the data it
references is altered.

--
Martin

'Things need not have happened to be true. Tales and dreams are the
shadow-truths that will endure when mere facts are dust and ashes,
and forgot' - Dream Country, Neil Gaiman

blackberry: !lirameak![Email address protected]
(For spam protection the word wrapped in !s is spelt backwards)

Oracle LazyDBA home page