update table1 as t1
LEFT JOIN table2 as t2 ON t1.tasksub_id = t2.id
set receive_state = 1
where t1.id = 1
update left join 多表关联更新
最新推荐文章于 2025-10-10 04:42:33 发布
博客展示了一条SQL语句,通过LEFT JOIN将table1和table2连接,以t1.tasksub_id和t2.id为连接条件,把table1中id为1的记录的receive_state字段更新为1。
500

被折叠的 条评论
为什么被折叠?



