sql优化(十):关联更新

45 阅读1分钟

关联更新

一、案例分析

日常开发中肯定会遇到用一张表更新另一张表的操作,一般会直接使用update

eg:
	update test t
	   set t.name = (select t1.name from test1 t1 where t.id = t1.id)
	 where exists