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

  

相关文章:

  • 2022-12-23
  • 2022-01-01
  • 2022-12-23
  • 2021-05-08
  • 2022-12-23
  • 2021-11-15
猜你喜欢
  • 2021-11-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-17
  • 2022-03-06
  • 2022-12-23
相关资源
相似解决方案