当前位置: 代码迷 >> Sql Server >> 跪求SQL update有关问题
  详细解决方案

跪求SQL update有关问题

热度:109   发布时间:2016-04-27 19:07:27.0
跪求SQL update问题
例如有A表和B表用SQL 语句比较如果A表中有的数据B表中没有那么将这条数据的某列的字段修改!!!急急请教

------解决方案--------------------
update a set a.flag=1 where not exists (select 1 from b where b.field=a.field)
  相关解决方案