I have to delete a record which is referenced in at lease 27 tables and that is PK i want to delete that Row.
I have tried for it but still i can't get proper result.
Plz help if possible.
Thankx & Regards,
Maru Akashkumar J.
I have to delete a record which is referenced in at lease 27 tables and that is PK i want to delete that Row.
I have tried for it but still i can't get proper result.
Plz help if possible.
Thankx & Regards,
Maru Akashkumar J.
You have to specify the delete/update behaviour when defining a foreign key constraint for the child table. For you to able to delete rows in your parent table, all the foreign key containts in all your 27 child tables would have to cascade on delete.
Have a look here : SQL Script to alter ALL Foreign Keys to add ON DELETE CASCADE
But i think there is a good reason, why you should not be able to delete records if there are plenty of dependent records elsewhere.