下面是MSSQL的语法,如何转换成mysql
SELECT
_nextBillingDate = UB.NextBillingDate,
_billingFrequency = (CASE IFNULL(UB.BillingFrequency,0) WHEN 0 THEN
_defaultBillingFrequency ELSE UB.BillingFrequency END),
_isCompletelyCreditBilled = (CASE WHEN PO.ChargeAmount > 0 THEN 0 ELSE 1 END),
_ownerId = PO.OwnerId
FROM PaymentOrder PO
INNER JOIN UserBillingInfo UB ON PO.OwnerId = UB.OwnerId
WHERE PO.Id = _paymentOrderId