Hi Chandra, you have two possible situations: Case (A) you can delete 'astro_tbl' rows with NO particular actions
Case (B1) you must alter 'astro_tbl' table adding a cascade costraint to have the system delete rows in the 'astro_tbl' table when one row in 'authen_tbl' table is being deleted if the 'mail' field is referred by the 'astro_tbl.mail' field Case (B2) you must alter 'astro_tbl' table adding a cascade costraint to have the system delete rows in the 'astro_tbl' table when one row in 'profile_tbl' table is being deleted if the 'pid' field is referred by the 'astro_tbl.pid' field See MySQL manual(http://dev.mysql.com/doc/refman/5.0/en/innodb-foreign-key-constraints.html) or my previous reply to see syntax for altering FOREIGN KEY costraints. Aloha! Claudio Nanni -----Messaggio originale----- Da: Chandra N [mailto:[EMAIL PROTECTED] Inviato: martedì 17 giugno 2008 12.06 A: mysql@lists.mysql.com Oggetto: delete a data from 3 tables hi all I created 3 tables namely authen_tbl,profile_tbl,astro_tbl,in which column name mail as primary key in authen_tbl table , query: pid int primary key auto_increment, foreign key (mail) references authen_tbl(mail) given in astro_tbl table and query foreign key(pid) references profile_tbl(pid) given in astro_tbl. My problem is how to delete a data at a strech from 3 tables. Thanks chandra -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]