删除行选择
问题描述:
我有这个SQL
语句MSQL
是选择我想要的东西(我要寻找并试图删除旧数据):删除行选择
SELECT *
FROM `reviews` as r
JOIN items as i
ON i.item_id = r.item_id
JOIN master_cat as c
ON i.cat_id = c.cat_id
WHERE category is null
现在,我需要一种只从名为reviews
的表中删除这些行的方法。我会如何去做这件事?
答
的DELETE
说法是,
DELETE r
FROM reviews r
INNER JOIN items i ON i.item_id = r.item_id
INNER JOIN master_cat c ON i.cat_id = c.cat_id
WHERE category is null
这么简单,谢谢...标记为正确 – KickingLettuce 2013-03-18 15:07:43
欢迎您':D' – 2013-03-18 15:16:42