-5

需要有 3 列

税率必须为 13%

税额需要添加到 InvoiceTotal 它添加的金额需要放在税列中,并且 InvoiceTotal 需要添加税额并放入总计列,但前提是 InvoiceTotal 大于 0$也就是如果有欠款

InvoiceTotal 是唯一需要从中提取数据的地方,InvoiceTotal 是表中称为 Invoices 的列

结构如下:

InvoiceTotal 税收总额

4

1 回答 1

2

听起来你想要这个:

select invoicetotal,
    invoicetotal * .13 as tax,
    invoicetotal * 1.13 as total
from invoices
where invoicetotal > 0
于 2012-11-08T15:07:28.557 回答