to update using cascade
3 posters
Unix C++ :: UNIX CPP :: RDBMS & ORACLE
Page 1 of 1
to update using cascade
I created customer table with cust_id as primary key...and
then created a department table and used cust_id as its foreign key...
I tried updating the cust_id in the customer table bt got an error 'violations..child found'.
how to update cust_id in both the tables using CASCADE?
then created a department table and used cust_id as its foreign key...
I tried updating the cust_id in the customer table bt got an error 'violations..child found'.
how to update cust_id in both the tables using CASCADE?
aarthi- Posts : 12
Points : 22
Join date : 2010-02-26
Re: to update using cascade
@ aarthi,
How did u check whether cust_id is set as foreign key in department table ?
How did u check whether cust_id is set as foreign key in department table ?
DineshThangaraju- Posts : 18
Points : 19
Join date : 2010-02-26
Age : 35
Location : India
Re: to update using cascade
I am not able to enter value for cust_id for department table that is not in customer table.
it says integrity constraint violated parent-key not found!!!
it says integrity constraint violated parent-key not found!!!
aarthi- Posts : 12
Points : 22
Join date : 2010-02-26
Re: to update using cascade
I think
using cascade you can delete all the record in dept table if the related row in cust table id deleted.. As for Update, You can update all the data except the related column(custid).
No point in using cascade to update the foriegn key by itself.
using cascade you can delete all the record in dept table if the related row in cust table id deleted.. As for Update, You can update all the data except the related column(custid).
No point in using cascade to update the foriegn key by itself.
Mahee- Posts : 29
Points : 233
Join date : 2010-03-03
Location : Haldia
Unix C++ :: UNIX CPP :: RDBMS & ORACLE
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|