Is there some reason why you don't just delete from the third table first,
then the second then the first?  Or maybe the reverse order, depending on
your key - it's hard to get a good idea of the structure when you just say
"1st table is connected with 2nd table by foreign key."  Just be sure you
don't violate referential integrity.

If you set up the foreign keys with the "delete cascade" option, you could
just delete from the top level table and the others will be deleted in turn.

On Tue, Jun 17, 2008 at 2:44 AM, Chandra N <[EMAIL PROTECTED]> wrote:

> hi,
>
> I would like to know how to delete a data from 3 table which is
> interconnected with each other by foreign key.
> i.e 1st table is connected with 2nd table by foreign key and 2nd table is
> connected with 3rd table with foreign key.
> please help to solve this problem.
>
> Thanks
> chandra
>
>
>
>




-- 
Jim Lyons
Web developer / Database administrator
http://www.weblyons.com

Reply via email to