日期:2014-05-17 浏览次数:20438 次
--try update a set F15=15 from tb as a where exists(select 2 from tb where f2=a.f2 and f1<a.f1)
------解决方案--------------------
select F1,F2,case when exists(select 1 from tb b where a.F1=b.F1 then ‘重复' else '' end as F15 from tb a
------解决方案--------------------
update tb1 set f15= cash when exists(select 1 from tb1 where a.f1=b.f1 then '重复'
else '' end
------解决方案--------------------
select F1, F2, case when exists (select 1 from tab b where a.F1=b.F1) then ‘重复' else '' end as F15 from tab a