UPDATE dbo.PayPalPaymentInfo SET GrossAmount=TotalPrice+TaxAmount WHERE GrossAmount IS NULL --如果TaxAmount为NUll时,TotalPrice有值,会导致GrossAmount也为null --即NULL+任何数字都会是NULL --NULL不能和任何字段比较和运算 UPDATE dbo.PayPalPaymentInfo SET GrossAmount=TotalPrice+ISNULL(TaxAmount,0) WHERE GrossAmount IS NULL