I think emp table already has some records and values in id of emp is
not present in id of loc table.. Make sure all data (id of emp) present
in id of loc
-----Original Message-----
From: sandeep
[mailto:oracledba-ezmlmshield-x52494088.[Email address protected]
Sent: Wednesday, October 31, 2007 10:29 AM
To: LazyDBA Discussion
Subject: Error while altering table to add foreign key
Hi Everyone,
While altering table to add a foreign key I am following error. Can
someone help me in tracking this error?
SQL> alter table emp add constraint sandy foreign key(id) references
loc(id);
alter table emp add constraint sandy foreign key(id) references loc(id)
*
ERROR at line 1:
ORA-02298: cannot validate (PMR.SANDY) - parent keys not found
Br,
Sandeep
The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.
www.wipro.com
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post a
dba job: http://jobs.lazydba.com To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
----------------------------------------------------------------------
CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024.
Oracle LazyDBA home page