mysql 更新条件为查询出的结果

UPDATE category c
INNER JOIN
(
SELECT b.category_id FROM category a,
(SELECT * FROM category WHERE del_flag != 'D')b
WHERE a.del_flag = 'D' AND b.parent_id = a.category_id
) d ON c.category_id = d.category_id SET c.del_flag = 'D'
update tableA a inner join tableB b on a.id = b.id set a.name = b.name
上一篇:scala目录


下一篇:SEO之基于thinkphp的URL伪静态