update a set status=1 from a,b where a.id=b.id and a.sl2<=a.sl3 and b.sl2<=b.sl3
update a set status=1 from a,b where a.id=b.id and a.sl2<=a.sl3 and b.sl2<=b.sl3
update dj_head set status=1 from dj_head a,dj b where a.id=b.djbh and b.sl2<=b.sl3 and b.sl2>0 and a.id=280 这句在B表其中一条记录不满足的情况下也让A表里的status变成1了,这是不对的,所以楼上的好象都不对
where a.id=b.id and a.sl2<=a.sl3 and b.sl2<=b.sl3
where a.id=b.id and a.sl2<=a.sl3 and b.sl2<=b.sl3
这句在B表其中一条记录不满足的情况下也让A表里的status变成1了,这是不对的,所以楼上的好象都不对