我需要一种快速编写更新查询的方法
UPDATE Content
SET Status = 1
WHERE Id in (SELECT userId from [User] where Location = 'US')
在此查询本身中,我想 SET Status = 0 WHERE Id NOT IN(SELECT userId from [User])。
基本上,我想将两个更新合二为一。
UPDATE Content
SET Status = 1
WHERE Id in (SELECT userId from [User] where Location = 'US')
AND
UPDATE Content
SET Status = 0
WHERE Id NOT in(SELECT userId from [User] where Location = 'US')
,谢谢