Hello Adolfo,

Yes I have tried it too but it did not work. Anyway i have done it programatically in 
my app.

Thanks.

"Adolfo Bello" <[EMAIL PROTECTED]> wrote:

>> I have two tables whose structures are below.
>>
>> - Table1 -
>> table1id int not null auto_increment
>> data varchar(30)
>>
>> - Table2 -
>> table2id int not null auto_increment
>> table1id int not null
>> data varchar(30)
>>
>>
>> These two tables are connected to each other with the
>> "table1id" column. I need to delete rows in table1 which have
>> no corresponding "table1id" values in table2 and also i need
>> to delete rows in table2 which have no corresponding
>> "table1id" values in table1. Any comments?
>
>Can you try a multi table DELETE? I haven't done it but I would be a shot at
>something like
>(adapted from MySQL Manual)
>DELETE t1 FROM t1,t2 WHERE t1.id=t2.id AND t2.id IS NULL
>
>Adolfo
>
>
>---------------------------------------------------------------------
>Before posting, please check:
>   http://www.mysql.com/manual.php   (the manual)
>   http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail <[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>

__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! 
http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to