DECLARE @IsDeleted AS BIT = 0;
SELECT @IsDeleted = IsDeleted from Updated
IF @IsDeleted=1
BEGIN
UPDATE Reviews
SET IsDeleted = @IsDeleted
WHERE CompanyID = 1
END;
Reviews
如果列更新为 1,我想更新Company
IsDeleted
。如何确定更新值为 ' 1 '
是错误SELECT @IsDeleted = IsDeleted from Updated