Linking with Foreign Keys


Posted on 16th Feb 2014 07:03 pm by admin

I have been getting an erro when I try and link:

create table Faculty_Specialty (I_Name varchar2(20) not null, Specialty varchar2(40) not null);

using :

alter table faculty_specialty modify (foreign key (I_Name) references faculty);

to:

Create table Faculty (I_Name varchar2(20) primary key);

The following error occurs:

SQL> alter table faculty_specialty modify (foreign key (I_Name) references faculty (I_Name));
alter table faculty_specialty modify (foreign key (I_Name) references faculty (I_Name))
*
ERROR at line 1:
ORA-02298: cannot validate (ORDB029.SYS_C0027281) - parent keys not found

I Know it's elementry but I can figure out why this is happening.....

No comments posted yet

Your Answer:

Login to answer
308 Like 29 Dislike
Previous forums Next forums
Other forums

Doubles are giving me problems
Ok so, first of all i made a double = 0.05, but when running the debugger it shows up as 0.04999. I

Streaming local file from PHP while it’s been written to by a CURL process
I am creating a simple Proxy server for my website. Why I am not using mod_proxy and mod_cache is a

how to get different value in second view of webdynpro?
hello guys,

In ABAP webdynpro I am trying to create one application having two views.

Querying info from one table based on info in another
Hi, I am currently trying to make a part for my user driven website where one user can subscribe to

Securing a user input - need some confirmation
Hello All,

I am in the process of recoding a large proportion of an e-commerce site, one of t

PHP4 to PHP5 Conversion
Hi Everyone,

I am working on a site that is built up on PHP4 and each page is being started f

double and single quotes in text fields acting up... help please
Single quotes, when entered into a text field, create an sql error upon Submit. It seems to create t

UDS 4.0 Datatype issue
UDS 4.0.322 -- connecting to NI Labview 9.0

When using connection method: Cache with live

Add weeks in a query?
I have a SQL that summarizes the quantity per week. The weeks that has no value does not exist in th

Syntax Help
I'm trying to make a form that edits a php file which contains config settings. I'm using strings t

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash