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);

Did you know?Explore Trending and Topic pages for more stories like this.
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

Save cookie to DB
I'm working on a pixel tracking script for an incentive website and I need to use an ASP script to s

whats wrong with my code please help!!!
this is the error


Warning: mysql_close(): supplied argument is not a valid MySQL-Link res

Help with usergroups? prolly really quick
So were coding our own forums for a game system we made an we have the users level setup but now I n

Header is not working in IE
Hi ! header function is not working in IE but it works in FF, Safari, Chrome. any help please. :

have trouble in a if condition
The if below is working ok, it check when indexes, name, zipcode and state are empty.
Code: &

mysq_num_rows
Hi,

I want to use:

Code: if(mysql_num_rows($ergebnis2)==2)
how can the value 2, be

Open browser page depending on XML results
Hello,

I have some PHP code that sends webbased from data to an external url ( in the form of

check comment for html
hi, I just wanted to check if a comment a user posts contains HTML, and if it does, to not allow it

Google Wave
So... has anyone used it yet? Is it any good?

http://wave.google.com/help/wave/about.html#vid

unexpected T_SL without a shift left token
Nothing too see here, I'm an idiot and resolved the problem.

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