This should work
DELETE Item FROM Item,ItemTag WHERE Item.ProductID =ItemTag.ItemID AND
ItemTag.TagID = '168'
Mark Kelly wrote:
Hi
I want to delete from the 'Item' table all the items identified by the
folowing query:
SELECT
Item.ProductID
FROM
Item, ItemTag
WHERE
ItemTag.
The following query should work if I understand what you're attempting
correctly. Use at your own risk though ;)
DELETE FROM Item USING Item, ItemTag WHERE ItemTag.ItemID =
Item.ProductID AND ItemTag.TagID = '168';
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
Hi.
On Thursday 05 July 2007 17:35, you wrote:
> > I want to delete from the 'Item' table
> > all the items identified by the folowing query:
>
> If you have MySQL 5+, you can do it using a sub-query:
>
> DELETE FROM
> Item
> WHERE
> ProductID IN (
> SELECT
> Item.ProductID
> FROM
> It
> I want to delete from the 'Item' table
> all the items identified by the folowing query:
If you have MySQL 5+, you can do it using a sub-query:
DELETE FROM
Item
WHERE
ProductID IN (
SELECT
Item.ProductID
FROM
Item, ItemTag
WHERE
ItemTag.TagID = '168'
AND
ItemTag.Ite