Delete cascade.....urgent urgent help!!! [message #77997] |
Mon, 31 December 2001 07:09 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
diaa
Messages: 3 Registered: December 2001
|
Junior Member |
|
|
when I want to delete a master detail record from master, I already made an Alert that sais"you are going to delete...."
when press ok and check on table their is no records been deleted what is the reason?
plz urgent urgent help in my sql ..delete record from master_tb when key pk = key fk...
----------------------------------------------------------------------
|
|
|
Re: Delete cascade.....urgent urgent help!!! [message #77999 is a reply to message #77997] |
Mon, 31 December 2001 10:27 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sokeh
Messages: 77 Registered: August 2000
|
Member |
|
|
It looks like your where clause is too general.
According to your statement, 'delete record from master_tb when key pk = key fk' is not specific.
you may need to say :
delete record from master_tb where detail.key = master.key
and master.key = :master.input_key.
you may cinclude an optional go_block(master block);
then your delete statement.
I would also do a check first to ensure that indeed a record exists for deletion.
----------------------------------------------------------------------
|
|
|
Re: Delete cascade.....urgent urgent help!!! [message #78014 is a reply to message #77997] |
Thu, 03 January 2002 20:27 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
rama krishna
Messages: 97 Registered: December 2001
|
Member |
|
|
u need to change relation type(go to relation prperties and change deletion behaviour property to cascading, whose default value is non isolating) between master & detail to cascading and there should be on delete cascade on the table.
----------------------------------------------------------------------
|
|
|