Try this ...
Delete from clients where 0 = (select count(*) from branches where branches.cid =
clients.cid)
Cheers
FattShin
-Original Message-
From: Vikram Vaswani [mailto:[EMAIL PROTECTED]
Sent: Friday, July 25, 2003 9:51 PM
To: Nils Valentin; [EMAIL PROTECTED]
Subject: Re: Help
On 25-Jul-2003 Vikram Vaswani wrote:
snip
mysql SELECT * FROM branches;
+--+-++--+
| bid | cid | bdesc | bloc |
+--+-++--+
| 1011 | 101 | Corporate HQ | CA |
Hi Vikram,
ignore both previous posts. Both don't work as wanted. I just realized that
and I will come back to you after I created the tables and made it sure.
Sorry for the confusion.
Best regards
Nils Valentin
Tokyo/Japan
2003 7 25 14:42Nils Valentin :
Hi Vikram,
just read the post
Hey,
Thanks for the help. I dont think this is possible, because MySQL will not
let you delete from the same table you are reading. Is there an alternative
way to do this using a subquery, you think?
ignore both previous posts. Both don't work as wanted. I just realized that
and I will come
Estoy tomando el sol
.
q
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Hi Vikram,
NULL is a special data type and requires special procedures.
Try this:
mysql delete from clients where cid = (select clients.cid from clients
left join branches using (cid) WHERE ISNULL(bid);
Please make NO SPACE betwen ISNULL and (bid) as otherwise wit will give you
an syntax