Hi Guyz [message #341158] |
Sun, 17 August 2008 05:52 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
*munnabhai*
Messages: 157 Registered: March 2008 Location: Riyadh
|
Senior Member |
|
|
HI Guyz
I m haveing some problem anyone could solve my problem
i have four tables whic 1 is master and the rest is details and the common field is systemid.
example
Table A (system_master)
1) systemid primary key
2) empname
3) dept_id
Table B
1) systemid (ref from table a )
2) pc_name
3) dept
Table C
1) systemid (ref from table a )
2) hardware_info
3) pc_hard_info
Table D
1) systemid (ref from table a )
2) dom_name
3) ip_add
i wanna to delete the single record from the above table im trying since yesterday but i didnt get the proper query how to delete the above record can some one help me to solve my problem
Waiting for replies
|
|
|
|
|
|
|
Re: Hi Guyz [message #341174 is a reply to message #341173] |
Sun, 17 August 2008 09:21 ![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) |
|
Have you created Primary key on table A and foreign keys on table B,C,D?
If you define the foreign key with the ON DELETE CASCADE option, then when you delete a record from the master table (Table A) ,all related records will be deleted from Table B,C,D)
|
|
|
|
Re: Hi Guyz [message #341446 is a reply to message #341173] |
Mon, 18 August 2008 21:01 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/67467.jpg) |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
*munnabhai* wrote on Mon, 18 August 2008 00:00 | no dear i need query only for that above tables
|
I suggest NOT making them 'query only'.
David
|
|
|