2017-02-14 112 views
-3

我需要計算credit_total列以反映invoice_total的10%。我請求社區的善意幫助。簡單百分比更新

UPDATE invoices 
SET credit_total = '.10' 
WHERE invoice_number = 'AX-014-027'; 

回答

5

使用*

UPDATE invoices 
    SET credit_total = invoice_total * 0.10 
    WHERE invoice_number = 'AX-014-027'; 
+0

OMG如此接近非常感謝你敲我的腦袋在百分比怎麼寫呢謝謝謝謝謝謝 –