DELETE
FROM
dd_item
WHERE
dd_item.id IN (
SELECT * from(
SELECT
a.id
FROM
dd_item a
LEFT JOIN dd_item_cat b ON a.class_id = b.id
WHERE
b.parent_id=23 and
(b.name in (‘生蚝‘,‘带鱼‘,‘黄鳝‘))
) as ee
)
//mysql 根据查询子条件进行删除表的记录
原文地址:https://blog.51cto.com/13288309/2480580
时间: 2024-11-08 12:02:38