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