sql 联合查询并更新


update sales
set sales.adminId = t.adminId
from (select a.adminId,a.realName from sales ,admin_administrators as a where sales.salesName = a.realName and a.adminId like '2%') as t
where sales.salesName = t.realName

posted @ 2014-03-04 10:33  无处安放的青春  阅读(640)  评论(0编辑  收藏  举报