日期:2014-05-18 浏览次数:20688 次
--变成2条,貌似是这样的
update 留言
set 交易地点 = '广州'
from 留言 a
left join [user] b on a.用户名 = b.登陆用户名
where b.登陆用户名 is not null
and a.排序 = @getid
update [user]
set 自己物品 = '手机'
from [user] b
right join 留言 a on a.用户名 = b.登陆用户名
where b.登陆用户名 is not null
and a.排序 = @getid
------解决方案--------------------
update b set b.自己物品='手机' from 留言 a,user b where a.用户名=b.登陆用户名 and a.排序='getid' update 留言 set 留言.交易地点=‘广州’ where 排序='getid'
------解决方案--------------------
触发器