DECLARE @IsDeleted AS BIT = 0;
SELECT @IsDeleted = IsDeleted from Updated
IF @IsDeleted=1
BEGIN
UPDATE Reviews
SET IsDeleted = @IsDeleted
WHERE CompanyID = 1
END;
列が1に更新されReviews
たら更新したい。値が更新されているかどうかを判断する方法は「 1」ですCompany
IsDeleted
エラーですSELECT @IsDeleted = IsDeleted from Updated