需求是;更新两个关联数据表其中一个表的数据信息;比如有user1 ,user2两个表
要更新user1表的info信息;
错误的写法如下
update user1 set user1.info = 'test' where user1.user_name in (select a.user_name from user1 a on user2 b on a.user_name = b.user_name ); 这种写法在orcal可以
正确的写法如下,采用关联更新
update user1 a inner join user2 b on a.user_name =b.user_name set a.info = '拍簧片';