update TbTest set num=1 from TbTest a inner join TbTest2 b on a.strId = b.strId and a.strCode = b.strCode
UPDATE TbTest SET num=1 WHERE exists (SELECT a,b,c from temp)
UPDATE tbtest SET num=1 FROM tbtest t1, others t2 WHERE t1.strid=t2.strid and t1.strcode=t2.strcode; -- or UPDATE tbtest t SET num=1 WHERE exists (select * from others where strid=t.strid and strcode=t.strcode);
UPDATE tt set con='hh' where (id+num) in (select (id+num) from dd)这样更简单。
update TbTest set num=1
from TbTest a inner join TbTest2 b on a.strId = b.strId and a.strCode = b.strCode
UPDATE tbtest
SET num=1
FROM tbtest t1, others t2
WHERE t1.strid=t2.strid and t1.strcode=t2.strcode;
-- or
UPDATE tbtest t
SET num=1
WHERE exists (select * from others where strid=t.strid and strcode=t.strcode);