daogu

saniao
December 9, 2010

Hi Guyz

Posted by : admin
Filed under : Forms

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 Sad 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


Answer:which table?

Answer:from All table related with SystemID


Answer:Have you used the ON DELETE CASCADE option when creating foreign keys?

Answer:no dear i need query only for that above tables


Answer: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)


Answer:If not, you’ll have to delete them manually, one by one (table, not record):


Answer:
*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

Related posts:

  1. Urgent Query Hi guyz, I have a problem with query, I...
  2. deleting records Dear all I have a form that based on...
  3. i am getting error in forms 6i Dear Friends, What about solution for This error. We...
  4. Update data of IOT from d2k Hello sir, I have one table organized by index....
  5. error in deleting record due to foreign key violation Hi, I CREATED A FORM AND A data block...

Tags :

No Comments

(required)
(will not be published) (required)
(opitional)